diff options
| author | yulei <yuleiz@gmail.com> | 2020-09-11 17:28:23 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-11 02:28:23 -0700 |
| commit | 6de4a53c7cb9a0d2dc4cbbe5dcbf19604daca465 (patch) | |
| tree | eaa7daca098aebbd6bba88b6781e7ff95167a14c /keyboards/inett_studio | |
| parent | 3d3c2e1d3fd3b3ca063491c8f623143db56dada7 (diff) | |
| download | qmk_firmware-6de4a53c7cb9a0d2dc4cbbe5dcbf19604daca465.tar.gz qmk_firmware-6de4a53c7cb9a0d2dc4cbbe5dcbf19604daca465.zip | |
[Keyboard] added SQUARE.X by iNETT Studio (#10066)
* added SQUARE.X keyboard from the iNETT Studio
* split to two sub directories
* Apply suggestions from code review
* Update keyboards/inett_studio/sqx/universal/universal.h
* Apply suggestions from code review
* update the matrix control keycodes settings
* use the offical macro to the rgb matrix control
* fixed led position issue
* Apply suggestions from code review
* removed the redundant #endif
* update default keymap
* Apply suggestions from code review
* add license header
Diffstat (limited to 'keyboards/inett_studio')
18 files changed, 1019 insertions, 0 deletions
diff --git a/keyboards/inett_studio/sqx/hotswap/config.h b/keyboards/inett_studio/sqx/hotswap/config.h new file mode 100644 index 000000000..a59ad3e7e --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/config.h | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | /** | ||
| 2 | * config.h | ||
| 3 | * | ||
| 4 | Copyright 2020 astro <yuleiz@gmail.com> | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | #pragma once | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0x694E //'iN' | ||
| 25 | #define PRODUCT_ID 0x5336 //'S6' | ||
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER iNETT Studio | ||
| 28 | #define PRODUCT SQUARE.X | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 5 | ||
| 32 | #define MATRIX_COLS 14 | ||
| 33 | #define MATRIX_ROW_PINS { F0, F1, F4, B7, D6} | ||
| 34 | #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, F7, F6, F5, E6, B0, D2, D4, D5, D3 } | ||
| 35 | #define UNUSED_PINS | ||
| 36 | #define DIODE_DIRECTION ROW2COL | ||
| 37 | |||
| 38 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 39 | #define DEBOUNCE 5 | ||
| 40 | |||
| 41 | /* | ||
| 42 | * Feature disable options | ||
| 43 | * These options are also useful to firmware size reduction. | ||
| 44 | */ | ||
| 45 | |||
| 46 | /* disable debug print */ | ||
| 47 | //#define NO_DEBUG | ||
| 48 | |||
| 49 | /* disable print */ | ||
| 50 | //#define NO_PRINT | ||
| 51 | |||
| 52 | |||
| 53 | //rgb light setting | ||
| 54 | #define RGBLIGHT_LIMIT_VAL 128 | ||
| 55 | #define RGBLED_NUM 18 | ||
| 56 | #define RGB_DI_PIN D7 | ||
| 57 | #define RGBLIGHT_ANIMATIONS | ||
| 58 | #define RGBLIGHT_HUE_STEP 8 | ||
| 59 | #define RGBLIGHT_SAT_STEP 8 | ||
| 60 | #define RGBLIGHT_VAL_STEP 8 | ||
| 61 | |||
| 62 | //rgb matrix setting | ||
| 63 | #define DRIVER_1_LED_TOTAL 33 | ||
| 64 | #define DRIVER_2_LED_TOTAL 31 | ||
| 65 | #define DRIVER_ADDR_1 0b1110100 | ||
| 66 | #define DRIVER_ADDR_2 0b1110111 | ||
| 67 | #define DRIVER_COUNT 2 | ||
| 68 | #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | ||
| 69 | |||
| 70 | #if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) | ||
| 71 | #define RGB_MATRIX_DISABLE_KEYCODES | ||
| 72 | #endif | ||
diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.c b/keyboards/inett_studio/sqx/hotswap/hotswap.c new file mode 100644 index 000000000..773b0b0b0 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.c | |||
| @@ -0,0 +1,191 @@ | |||
| 1 | /** | ||
| 2 | * @file hotswap.c | ||
| 3 | * | ||
| 4 | Copyright 2020 astro <yuleiz@gmail.com> | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include "hotswap.h" | ||
| 21 | |||
| 22 | #ifdef RGB_MATRIX_ENABLE | ||
| 23 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | ||
| 24 | /* Refer to IS31 manual for these locations | ||
| 25 | * driver | ||
| 26 | * | R location | ||
| 27 | * | | G location | ||
| 28 | * | | | B location | ||
| 29 | * | | | | */ | ||
| 30 | // left CA | ||
| 31 | {0, C1_1, C3_2, C4_2}, | ||
| 32 | {0, C1_2, C2_2, C4_3}, | ||
| 33 | {0, C1_3, C2_3, C3_3}, | ||
| 34 | {0, C1_4, C2_4, C3_4}, | ||
| 35 | {0, C1_5, C2_5, C3_5}, | ||
| 36 | {0, C1_6, C2_6, C3_6}, | ||
| 37 | {0, C1_7, C2_7, C3_7}, | ||
| 38 | {0, C1_8, C2_8, C3_8}, | ||
| 39 | |||
| 40 | //{0, C5_1, C4_1, C6_1}, | ||
| 41 | //{0, C5_8, C4_8, C6_8}, | ||
| 42 | |||
| 43 | {0, C9_1, C8_1, C7_1}, | ||
| 44 | {0, C9_2, C8_2, C7_2}, | ||
| 45 | //{0, C9_3, C8_3, C7_3}, | ||
| 46 | {0, C9_4, C8_4, C7_4}, | ||
| 47 | {0, C9_5, C8_5, C7_5}, | ||
| 48 | {0, C9_6, C8_6, C7_6}, | ||
| 49 | {0, C9_7, C8_7, C6_6}, | ||
| 50 | {0, C9_8, C7_7, C6_7}, | ||
| 51 | // left CB | ||
| 52 | {0, C1_9, C3_10, C4_10}, | ||
| 53 | {0, C1_10, C2_10, C4_11}, | ||
| 54 | {0, C1_11, C2_11, C3_11}, | ||
| 55 | {0, C1_12, C2_12, C3_12}, | ||
| 56 | {0, C1_13, C2_13, C3_13}, | ||
| 57 | {0, C1_14, C2_14, C3_14}, | ||
| 58 | {0, C1_15, C2_15, C3_15}, | ||
| 59 | {0, C1_16, C2_16, C3_16}, | ||
| 60 | |||
| 61 | {0, C5_9, C4_9, C6_9}, | ||
| 62 | {0, C5_16, C4_16, C6_16}, | ||
| 63 | |||
| 64 | {0, C9_9, C8_9, C7_9}, | ||
| 65 | {0, C9_10, C8_10, C7_10}, | ||
| 66 | {0, C9_11, C8_11, C7_11}, | ||
| 67 | {0, C9_12, C8_12, C7_12}, | ||
| 68 | {0, C9_13, C8_13, C7_13}, | ||
| 69 | {0, C9_14, C8_14, C7_14}, | ||
| 70 | {0, C9_15, C8_15, C6_14}, | ||
| 71 | {0, C9_16, C7_15, C6_15}, | ||
| 72 | |||
| 73 | // right CA | ||
| 74 | {1, C1_1, C3_2, C4_2}, | ||
| 75 | {1, C1_2, C2_2, C4_3}, | ||
| 76 | {1, C1_3, C2_3, C3_3}, | ||
| 77 | {1, C1_4, C2_4, C3_4}, | ||
| 78 | {1, C1_5, C2_5, C3_5}, | ||
| 79 | {1, C1_6, C2_6, C3_6}, | ||
| 80 | {1, C1_7, C2_7, C3_7}, | ||
| 81 | {1, C1_8, C2_8, C3_8}, | ||
| 82 | |||
| 83 | //{1, C5_1, C4_1, C6_1}, | ||
| 84 | //{1, C5_8, C4_8, C6_8}, | ||
| 85 | |||
| 86 | {1, C9_1, C8_1, C7_1}, | ||
| 87 | {1, C9_2, C8_2, C7_2}, | ||
| 88 | {1, C9_3, C8_3, C7_3}, | ||
| 89 | {1, C9_4, C8_4, C7_4}, | ||
| 90 | {1, C9_5, C8_5, C7_5}, | ||
| 91 | {1, C9_6, C8_6, C7_6}, | ||
| 92 | {1, C9_7, C8_7, C6_6}, | ||
| 93 | {1, C9_8, C7_7, C6_7}, | ||
| 94 | // right CB | ||
| 95 | {1, C1_9, C3_10, C4_10}, | ||
| 96 | {1, C1_10, C2_10, C4_11}, | ||
| 97 | {1, C1_11, C2_11, C3_11}, | ||
| 98 | {1, C1_12, C2_12, C3_12}, | ||
| 99 | {1, C1_13, C2_13, C3_13}, | ||
| 100 | //{1, C1_14, C2_14, C3_14}, | ||
| 101 | {1, C1_15, C2_15, C3_15}, | ||
| 102 | {1, C1_16, C2_16, C3_16}, | ||
| 103 | |||
| 104 | //{1, C5_9, C4_9, C6_9}, | ||
| 105 | //{1, C5_16, C4_16, C6_16}, | ||
| 106 | |||
| 107 | {1, C9_9, C8_9, C7_9}, | ||
| 108 | {1, C9_10, C8_10, C7_10}, | ||
| 109 | {1, C9_11, C8_11, C7_11}, | ||
| 110 | {1, C9_12, C8_12, C7_12}, | ||
| 111 | {1, C9_13, C8_13, C7_13}, | ||
| 112 | {1, C9_14, C8_14, C7_14}, | ||
| 113 | {1, C9_15, C8_15, C6_14}, | ||
| 114 | {1, C9_16, C7_15, C6_15}, | ||
| 115 | }; | ||
| 116 | |||
| 117 | led_config_t g_led_config = { | ||
| 118 | { | ||
| 119 | { 18, 19, 20, 21, 22, 23, 24, 16, 17, 36, 37, 38, 39, 40}, | ||
| 120 | { 26, 27, 28, 29, 30, 31, 25, 48, 41, 42, 43, 44, 45, 46}, | ||
| 121 | { 8, 7, 0, 32, 33, 34, 35, 49, 50, 51, 52, 53, NO_LED, 47}, | ||
| 122 | { 9, NO_LED, 10, 1, 2, 3, 4, 5, 56, 55, 57, 58, 59, 54}, | ||
| 123 | { 14, 13, 12, 11, NO_LED, NO_LED, 6, 15, NO_LED, NO_LED, 60, 61, 62, 63}, | ||
| 124 | }, | ||
| 125 | { | ||
| 126 | { 48, 32},{ 48, 48},{ 64, 48},{ 80, 48},{ 96, 48},{112, 48},{112, 64},{ 32, 32}, | ||
| 127 | { 16, 32},{ 16, 48}, { 32, 48},{ 64, 64},{ 40, 64},{ 20, 64},{ 0, 64}, | ||
| 128 | |||
| 129 | { 0, 0},{ 16, 0},{ 32, 0},{ 48, 0},{ 64, 0},{ 80, 0},{ 96, 0},{ 96, 16}, | ||
| 130 | { 0, 16},{ 16, 16}, | ||
| 131 | { 32, 16},{ 48, 16},{ 64, 16},{ 80, 16},{ 64, 32},{ 80, 32},{ 96, 32},{112, 32}, | ||
| 132 | |||
| 133 | {112, 0},{128, 0},{144, 0},{160, 0},{176, 0},{192, 0},{208, 0},{224, 0}, | ||
| 134 | {128, 16},{144, 16},{160, 16},{176, 16},{192, 16},{216, 16},{216, 32},{112, 16}, | ||
| 135 | |||
| 136 | {128, 32},{144, 32},{160, 32},{176, 32},{192, 32}, {224, 48},{144, 48}, | ||
| 137 | {128, 48},{160, 48},{176, 48},{192, 48},{160, 64},{180, 64},{200, 64},{224, 64} | ||
| 138 | }, | ||
| 139 | { | ||
| 140 | 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 141 | 1, 1, 4, 1, 1, 1, 1, | ||
| 142 | |||
| 143 | 1, 4, 4, 4, 4, 4, 4, 4, | ||
| 144 | 1, 4, | ||
| 145 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
| 146 | |||
| 147 | 4, 4, 4, 4, 4, 4, 1, 1, | ||
| 148 | 4, 4, 4, 4, 4, 1, 1, 4, | ||
| 149 | |||
| 150 | 4, 4, 4, 4, 4, 1, 4, | ||
| 151 | 4, 4, 4, 1, 1, 1, 1, 1, | ||
| 152 | } | ||
| 153 | }; | ||
| 154 | |||
| 155 | #endif //RGB_MATRIX_ENABLE | ||
| 156 | |||
| 157 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 158 | if (record->event.pressed) { | ||
| 159 | switch(keycode) { | ||
| 160 | #if defined(RGB_MATRIX_DISABLE_KEYCODES) | ||
| 161 | case RGB_MATRIX_TOGGLE: // toggle rgb matrix | ||
| 162 | rgb_matrix_toggle(); | ||
| 163 | return false; | ||
| 164 | case RGB_MATRIX_STEP: | ||
| 165 | rgb_matrix_step(); | ||
| 166 | return false; | ||
| 167 | case RGB_MATRIX_INC_HUE: | ||
| 168 | rgb_matrix_increase_hue(); | ||
| 169 | return false; | ||
| 170 | case RGB_MATRIX_DEC_HUE: | ||
| 171 | rgb_matrix_decrease_hue(); | ||
| 172 | return false; | ||
| 173 | case RGB_MATRIX_INC_SAT: | ||
| 174 | rgb_matrix_increase_sat(); | ||
| 175 | return false; | ||
| 176 | case RGB_MATRIX_DEC_SAT: | ||
| 177 | rgb_matrix_decrease_sat(); | ||
| 178 | return false; | ||
| 179 | case RGB_MATRIX_INC_VAL: | ||
| 180 | rgb_matrix_increase_val(); | ||
| 181 | return false; | ||
| 182 | case RGB_MATRIX_DEC_VAL: | ||
| 183 | rgb_matrix_decrease_val(); | ||
| 184 | return false; | ||
| 185 | #endif | ||
| 186 | default: | ||
| 187 | break; | ||
| 188 | } | ||
| 189 | } | ||
| 190 | return true; | ||
| 191 | } | ||
diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.h b/keyboards/inett_studio/sqx/hotswap/hotswap.h new file mode 100644 index 000000000..b879f7aaa --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.h | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | /** | ||
| 2 | * @file hotswap.h | ||
| 3 | * | ||
| 4 | Copyright 2020 astro <yuleiz@gmail.com> | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | #pragma once | ||
| 20 | |||
| 21 | #include "quantum.h" | ||
| 22 | |||
| 23 | // This a shortcut to help you visually see your layout. | ||
| 24 | // The first section contains all of the arguements | ||
| 25 | // The second converts the arguments into a two-dimensional array | ||
| 26 | #define LAYOUT_60_tsangan_hhkb( \ | ||
| 27 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ | ||
| 28 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
| 29 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
| 30 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 31 | k40, k42, k43, k47, k49, k4a, k4b \ | ||
| 32 | ) \ | ||
| 33 | { \ | ||
| 34 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ | ||
| 35 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
| 36 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
| 37 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
| 38 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ | ||
| 39 | } | ||
| 40 | |||
| 41 | #if defined(RGB_MATRIX_DISABLE_KEYCODES) | ||
| 42 | # ifndef RGB_MATRIX_TOGGLE | ||
| 43 | # define RGB_MATRIX_TOGGLE KC_F16 | ||
| 44 | # endif | ||
| 45 | # ifndef RGB_MATRIX_STEP | ||
| 46 | # define RGB_MATRIX_STEP KC_F17 | ||
| 47 | # endif | ||
| 48 | # ifndef RGB_MATRIX_INC_HUE | ||
| 49 | # define RGB_MATRIX_INC_HUE KC_F18 | ||
| 50 | # endif | ||
| 51 | # ifndef RGB_MATRIX_DEC_HUE | ||
| 52 | # define RGB_MATRIX_DEC_HUE KC_F19 | ||
| 53 | # endif | ||
| 54 | # ifndef RGB_MATRIX_INC_SAT | ||
| 55 | # define RGB_MATRIX_INC_SAT KC_F20 | ||
| 56 | # endif | ||
| 57 | # ifndef RGB_MATRIX_DEC_SAT | ||
| 58 | # define RGB_MATRIX_DEC_SAT KC_F21 | ||
| 59 | # endif | ||
| 60 | # ifndef RGB_MATRIX_INC_VAL | ||
| 61 | # define RGB_MATRIX_INC_VAL KC_F22 | ||
| 62 | # endif | ||
| 63 | # ifndef RGB_MATRIX_DEC_VAL | ||
| 64 | # define RGB_MATRIX_DEC_VAL KC_F23 | ||
| 65 | # endif | ||
| 66 | #endif | ||
diff --git a/keyboards/inett_studio/sqx/hotswap/info.json b/keyboards/inett_studio/sqx/hotswap/info.json new file mode 100644 index 000000000..7180422c3 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/info.json | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "sqx", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 15, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_60_tsangan_hhkb": { | ||
| 9 | "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] | ||
| 10 | } | ||
| 11 | } | ||
| 12 | } | ||
diff --git a/keyboards/inett_studio/sqx/hotswap/keymaps/default/keymap.c b/keyboards/inett_studio/sqx/hotswap/keymaps/default/keymap.c new file mode 100644 index 000000000..0e814cc98 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/keymaps/default/keymap.c | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 astro <yuleiz@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 21 | [0] = LAYOUT_60_tsangan_hhkb( | ||
| 22 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_DEL, KC_BSPC, | ||
| 23 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, | ||
| 24 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, | ||
| 25 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_END, | ||
| 26 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1),KC_RCTL), | ||
| 27 | |||
| 28 | [1] = LAYOUT_60_tsangan_hhkb( | ||
| 29 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,KC_PSCR, | ||
| 30 | RESET, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, | ||
| 31 | _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, | ||
| 32 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 33 | _______,_______,_______, _______, _______,_______,_______), | ||
| 34 | }; | ||
diff --git a/keyboards/inett_studio/sqx/hotswap/keymaps/via/keymap.c b/keyboards/inett_studio/sqx/hotswap/keymaps/via/keymap.c new file mode 100644 index 000000000..d9258169f --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/keymaps/via/keymap.c | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 astro <yuleiz@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 21 | [0] = LAYOUT_60_tsangan_hhkb( | ||
| 22 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_DEL, KC_BSPC, | ||
| 23 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, | ||
| 24 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, | ||
| 25 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, MO(1), | ||
| 26 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, TG(1),KC_RCTL), | ||
| 27 | |||
| 28 | [1] = LAYOUT_60_tsangan_hhkb( | ||
| 29 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,KC_PSCR, | ||
| 30 | RESET, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, | ||
| 31 | _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, | ||
| 32 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 33 | _______,_______,_______, _______, _______, TG(0),_______), | ||
| 34 | |||
| 35 | [2] = LAYOUT_60_tsangan_hhkb( | ||
| 36 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 37 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 38 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 39 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 40 | _______,_______,_______, _______, _______, TG(0),_______), | ||
| 41 | |||
| 42 | [3] = LAYOUT_60_tsangan_hhkb( | ||
| 43 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 44 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 45 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 46 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 47 | _______,_______,_______, _______, _______, TG(0),_______), | ||
| 48 | }; | ||
diff --git a/keyboards/inett_studio/sqx/hotswap/keymaps/via/rules.mk b/keyboards/inett_studio/sqx/hotswap/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/inett_studio/sqx/hotswap/readme.md b/keyboards/inett_studio/sqx/hotswap/readme.md new file mode 100644 index 000000000..faf5cc6a6 --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/readme.md | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | # iNETT Studio SQUARE.X hotswap | ||
| 2 | |||
| 3 | A 60% keyboard from the iNETT Studio's SQUARE series. | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [astro](https://github.com/yulei) | ||
| 6 | * Hardware Supported: SQUARE.X hotswap | ||
| 7 | * Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=107062.0) | ||
| 8 | |||
| 9 | Make example for this keyboard (after setting up your build environment): | ||
| 10 | |||
| 11 | make inett_studio/sqx/hotswap:default | ||
| 12 | |||
| 13 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/inett_studio/sqx/hotswap/rules.mk b/keyboards/inett_studio/sqx/hotswap/rules.mk new file mode 100644 index 000000000..80968787d --- /dev/null +++ b/keyboards/inett_studio/sqx/hotswap/rules.mk | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = no # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | RGB_MATRIX_ENABLE = yes # Use RGB per key light | ||
| 22 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 23 | AUDIO_ENABLE = no # Audio output | ||
| 24 | |||
| 25 | LTO_ENABLE = yes # Reducing firmware size | ||
| 26 | |||
| 27 | LAYOUTS = 60_tsangan_hhkb | ||
diff --git a/keyboards/inett_studio/sqx/universal/config.h b/keyboards/inett_studio/sqx/universal/config.h new file mode 100644 index 000000000..a4a5b42c4 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/config.h | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | /** | ||
| 2 | * config.h | ||
| 3 | * | ||
| 4 | Copyright 2020 astro <yuleiz@gmail.com> | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | #pragma once | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0x694E //'iN' | ||
| 25 | #define PRODUCT_ID 0x5336 //'S6' | ||
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER iNETT Studio | ||
| 28 | #define PRODUCT SQUARE.X | ||
| 29 | |||
| 30 | /* key matrix size */ | ||
| 31 | #define MATRIX_ROWS 5 | ||
| 32 | #define MATRIX_COLS 14 | ||
| 33 | #define MATRIX_ROW_PINS { F0, F1, F4, B7, D6} | ||
| 34 | #define MATRIX_COL_PINS { C7, C6, B6, B5, B4, F7, F6, F5, E6, B0, D2, D4, D5, D3 } | ||
| 35 | #define UNUSED_PINS | ||
| 36 | #define DIODE_DIRECTION ROW2COL | ||
| 37 | |||
| 38 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 39 | #define DEBOUNCE 5 | ||
| 40 | |||
| 41 | /* | ||
| 42 | * Feature disable options | ||
| 43 | * These options are also useful to firmware size reduction. | ||
| 44 | */ | ||
| 45 | |||
| 46 | /* disable debug print */ | ||
| 47 | //#define NO_DEBUG | ||
| 48 | |||
| 49 | /* disable print */ | ||
| 50 | //#define NO_PRINT | ||
| 51 | |||
| 52 | |||
| 53 | //rgb light setting | ||
| 54 | #define RGBLIGHT_LIMIT_VAL 128 | ||
| 55 | #define RGBLED_NUM 18 | ||
| 56 | #define RGB_DI_PIN D7 | ||
| 57 | #define RGBLIGHT_ANIMATIONS | ||
| 58 | #define RGBLIGHT_HUE_STEP 8 | ||
| 59 | #define RGBLIGHT_SAT_STEP 8 | ||
| 60 | #define RGBLIGHT_VAL_STEP 8 | ||
| 61 | |||
| 62 | //rgb matrix setting | ||
| 63 | #define DRIVER_1_LED_TOTAL 36 | ||
| 64 | #define DRIVER_2_LED_TOTAL 36 | ||
| 65 | #define DRIVER_ADDR_1 0b1110100 | ||
| 66 | #define DRIVER_ADDR_2 0b1110111 | ||
| 67 | #define DRIVER_COUNT 2 | ||
| 68 | #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) | ||
| 69 | |||
| 70 | #if defined(RGB_MATRIX_ENABLE) && defined(RGBLIGHT_ENABLE) | ||
| 71 | # define RGB_MATRIX_DISABLE_KEYCODES | ||
| 72 | #endif | ||
diff --git a/keyboards/inett_studio/sqx/universal/info.json b/keyboards/inett_studio/sqx/universal/info.json new file mode 100644 index 000000000..d0956b680 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/info.json | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "sqx", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "qmk", | ||
| 5 | "width": 15, | ||
| 6 | "height": 5, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT_60_ansi_tsangan_split_rshift": { | ||
| 9 | "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] | ||
| 10 | }, | ||
| 11 | "LAYOUT_60_ansi": { | ||
| 12 | "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] | ||
| 13 | }, | ||
| 14 | "LAYOUT_60_hhkb": { | ||
| 15 | "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}] | ||
| 16 | }, | ||
| 17 | "LAYOUT_60_iso": { | ||
| 18 | "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":2.75}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] | ||
| 19 | }, | ||
| 20 | "LAYOUT_60_ansi_split_bs_rshift": { | ||
| 21 | "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":12.5, "y":4, "w":1.25}, {"x":13.75, "y":4, "w":1.25}] | ||
| 22 | }, | ||
| 23 | "LAYOUT_60_tsangan_hhkb": { | ||
| 24 | "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":0, "y":4, "w":1.5}, {"x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"x":11, "y":4, "w":1.5}, {"x":12.5, "y":4}, {"x":13.5, "y":4, "w":1.5}] | ||
| 25 | } | ||
| 26 | } | ||
| 27 | } | ||
diff --git a/keyboards/inett_studio/sqx/universal/keymaps/default/keymap.c b/keyboards/inett_studio/sqx/universal/keymaps/default/keymap.c new file mode 100644 index 000000000..bd2869e24 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/keymaps/default/keymap.c | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 astro <yuleiz@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 21 | [0] = LAYOUT_60_ansi_split_bs_rshift( | ||
| 22 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_DEL, KC_BSPC, | ||
| 23 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, | ||
| 24 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, | ||
| 25 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, MO(1), | ||
| 26 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1),KC_RCTL), | ||
| 27 | |||
| 28 | [1] = LAYOUT_60_ansi_split_bs_rshift( | ||
| 29 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,KC_PSCR, | ||
| 30 | RESET, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, | ||
| 31 | _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, | ||
| 32 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 33 | _______,_______,_______, _______, _______,_______,TG(0),_______), | ||
| 34 | }; | ||
diff --git a/keyboards/inett_studio/sqx/universal/keymaps/via/keymap.c b/keyboards/inett_studio/sqx/universal/keymaps/via/keymap.c new file mode 100644 index 000000000..c58090d9d --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/keymaps/via/keymap.c | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 astro <yuleiz@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #include QMK_KEYBOARD_H | ||
| 19 | |||
| 20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 21 | [0] = LAYOUT_60_ansi_split_bs_rshift( | ||
| 22 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_DEL, KC_BSPC, | ||
| 23 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS, | ||
| 24 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, | ||
| 25 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, MO(1), | ||
| 26 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1),KC_RCTL), | ||
| 27 | |||
| 28 | [1] = LAYOUT_60_ansi_split_bs_rshift( | ||
| 29 | _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,KC_PSCR, | ||
| 30 | RESET, RGB_TOG,RGB_MOD,_______, KC_F16, KC_F17,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______, | ||
| 31 | _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME, KC_END,_______, | ||
| 32 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 33 | _______,_______,_______, _______, _______,_______, TG(0),_______), | ||
| 34 | |||
| 35 | [2] = LAYOUT_60_ansi_split_bs_rshift( | ||
| 36 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 37 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 38 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 39 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 40 | _______,_______,_______, _______, _______,_______, TG(0),_______), | ||
| 41 | |||
| 42 | [3] = LAYOUT_60_ansi_split_bs_rshift( | ||
| 43 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 44 | _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 45 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 46 | _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, | ||
| 47 | _______,_______,_______, _______, _______,_______, TG(0),_______), | ||
| 48 | }; | ||
diff --git a/keyboards/inett_studio/sqx/universal/keymaps/via/rules.mk b/keyboards/inett_studio/sqx/universal/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/inett_studio/sqx/universal/readme.md b/keyboards/inett_studio/sqx/universal/readme.md new file mode 100644 index 000000000..0a09b9c7d --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/readme.md | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | # iNETT Studio SQUARE.X universal | ||
| 2 | |||
| 3 | A 60% keyboard from the iNETT Studio's SQUARE series. | ||
| 4 | |||
| 5 | * Keyboard Maintainer: [astro](https://github.com/yulei) | ||
| 6 | * Hardware Supported: SQUARE.X universal | ||
| 7 | * Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=107062.0) | ||
| 8 | |||
| 9 | Make example for this keyboard (after setting up your build environment): | ||
| 10 | |||
| 11 | make inett_studio/sqx/universal:default | ||
| 12 | |||
| 13 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/inett_studio/sqx/universal/rules.mk b/keyboards/inett_studio/sqx/universal/rules.mk new file mode 100644 index 000000000..cf3a64ba9 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/rules.mk | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = no # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = yes # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | RGB_MATRIX_ENABLE = yes # Use RGB per key light | ||
| 22 | |||
| 23 | LTO_ENABLE = yes # Reducing firmware size | ||
| 24 | |||
| 25 | LAYOUTS = 60_ansi 60_hhkb 60_iso 60_ansi_split_bs_rshift 60_tsangan_hhkb | ||
diff --git a/keyboards/inett_studio/sqx/universal/universal.c b/keyboards/inett_studio/sqx/universal/universal.c new file mode 100644 index 000000000..f0f7f88f7 --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/universal.c | |||
| @@ -0,0 +1,194 @@ | |||
| 1 | /** | ||
| 2 | * @file universal.c | ||
| 3 | * | ||
| 4 | Copyright 2020 astro <yuleiz@gmail.com> | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | |||
| 20 | #include "universal.h" | ||
| 21 | |||
| 22 | #ifdef RGB_MATRIX_ENABLE | ||
| 23 | const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | ||
| 24 | /* Refer to IS31 manual for these locations | ||
| 25 | * driver | ||
| 26 | * | R location | ||
| 27 | * | | G location | ||
| 28 | * | | | B location | ||
| 29 | * | | | | */ | ||
| 30 | // left CA | ||
| 31 | {0, C1_1, C3_2, C4_2}, | ||
| 32 | {0, C1_2, C2_2, C4_3}, | ||
| 33 | {0, C1_3, C2_3, C3_3}, | ||
| 34 | {0, C1_4, C2_4, C3_4}, | ||
| 35 | {0, C1_5, C2_5, C3_5}, | ||
| 36 | {0, C1_6, C2_6, C3_6}, | ||
| 37 | {0, C1_7, C2_7, C3_7}, | ||
| 38 | {0, C1_8, C2_8, C3_8}, | ||
| 39 | |||
| 40 | {0, C5_1, C4_1, C6_1}, | ||
| 41 | {0, C5_8, C4_8, C6_8}, | ||
| 42 | |||
| 43 | {0, C9_1, C8_1, C7_1}, | ||
| 44 | {0, C9_2, C8_2, C7_2}, | ||
| 45 | {0, C9_3, C8_3, C7_3}, | ||
| 46 | {0, C9_4, C8_4, C7_4}, | ||
| 47 | {0, C9_5, C8_5, C7_5}, | ||
| 48 | {0, C9_6, C8_6, C7_6}, | ||
| 49 | {0, C9_7, C8_7, C6_6}, | ||
| 50 | {0, C9_8, C7_7, C6_7}, | ||
| 51 | // left CB | ||
| 52 | {0, C1_9, C3_10, C4_10}, | ||
| 53 | {0, C1_10, C2_10, C4_11}, | ||
| 54 | {0, C1_11, C2_11, C3_11}, | ||
| 55 | {0, C1_12, C2_12, C3_12}, | ||
| 56 | {0, C1_13, C2_13, C3_13}, | ||
| 57 | {0, C1_14, C2_14, C3_14}, | ||
| 58 | {0, C1_15, C2_15, C3_15}, | ||
| 59 | {0, C1_16, C2_16, C3_16}, | ||
| 60 | |||
| 61 | {0, C5_9, C4_9, C6_9}, | ||
| 62 | {0, C5_16, C4_16, C6_16}, | ||
| 63 | |||
| 64 | {0, C9_9, C8_9, C7_9}, | ||
| 65 | {0, C9_10, C8_10, C7_10}, | ||
| 66 | {0, C9_11, C8_11, C7_11}, | ||
| 67 | {0, C9_12, C8_12, C7_12}, | ||
| 68 | {0, C9_13, C8_13, C7_13}, | ||
| 69 | {0, C9_14, C8_14, C7_14}, | ||
| 70 | {0, C9_15, C8_15, C6_14}, | ||
| 71 | {0, C9_16, C7_15, C6_15}, | ||
| 72 | |||
| 73 | // right CA | ||
| 74 | {1, C1_1, C3_2, C4_2}, | ||
| 75 | {1, C1_2, C2_2, C4_3}, | ||
| 76 | {1, C1_3, C2_3, C3_3}, | ||
| 77 | {1, C1_4, C2_4, C3_4}, | ||
| 78 | {1, C1_5, C2_5, C3_5}, | ||
| 79 | {1, C1_6, C2_6, C3_6}, | ||
| 80 | {1, C1_7, C2_7, C3_7}, | ||
| 81 | {1, C1_8, C2_8, C3_8}, | ||
| 82 | |||
| 83 | {1, C5_1, C4_1, C6_1}, | ||
| 84 | {1, C5_8, C4_8, C6_8}, | ||
| 85 | |||
| 86 | {1, C9_1, C8_1, C7_1}, | ||
| 87 | {1, C9_2, C8_2, C7_2}, | ||
| 88 | {1, C9_3, C8_3, C7_3}, | ||
| 89 | {1, C9_4, C8_4, C7_4}, | ||
| 90 | {1, C9_5, C8_5, C7_5}, | ||
| 91 | {1, C9_6, C8_6, C7_6}, | ||
| 92 | {1, C9_7, C8_7, C6_6}, | ||
| 93 | {1, C9_8, C7_7, C6_7}, | ||
| 94 | // right CB | ||
| 95 | {1, C1_9, C3_10, C4_10}, | ||
| 96 | {1, C1_10, C2_10, C4_11}, | ||
| 97 | {1, C1_11, C2_11, C3_11}, | ||
| 98 | {1, C1_12, C2_12, C3_12}, | ||
| 99 | {1, C1_13, C2_13, C3_13}, | ||
| 100 | {1, C1_14, C2_14, C3_14}, | ||
| 101 | {1, C1_15, C2_15, C3_15}, | ||
| 102 | {1, C1_16, C2_16, C3_16}, | ||
| 103 | |||
| 104 | {1, C5_9, C4_9, C6_9}, | ||
| 105 | {1, C5_16, C4_16, C6_16}, | ||
| 106 | |||
| 107 | {1, C9_9, C8_9, C7_9}, | ||
| 108 | {1, C9_10, C8_10, C7_10}, | ||
| 109 | {1, C9_11, C8_11, C7_11}, | ||
| 110 | {1, C9_12, C8_12, C7_12}, | ||
| 111 | {1, C9_13, C8_13, C7_13}, | ||
| 112 | {1, C9_14, C8_14, C7_14}, | ||
| 113 | {1, C9_15, C8_15, C6_14}, | ||
| 114 | {1, C9_16, C7_15, C6_15}, | ||
| 115 | }; | ||
| 116 | |||
| 117 | led_config_t g_led_config = { | ||
| 118 | { | ||
| 119 | { 0, 1, 2, 3, 4, 5, 6, 36, 37, 38, 39, 40, 41, 42}, | ||
| 120 | { 8, 9, 10, 11, 12, 13, 7, 45, 46, 47, 48, 49, 50, 51}, | ||
| 121 | { 26,27, 18, 14, 15, 16, 17, 54, 55, 56, 57, 58, 59, 53}, | ||
| 122 | { 29,30, 31, 19, 20, 21, 22, 23, 62, 63, 64, 65, 66, 61}, | ||
| 123 | { 35,34, 33, NO_LED, NO_LED, NO_LED, 24, 44, NO_LED, NO_LED, 68, 69, 70, 71}, | ||
| 124 | }, | ||
| 125 | { | ||
| 126 | { 32, 32},{ 48, 48},{ 64, 48},{ 80, 48},{ 96, 48},{112, 48},{ 96, 64},{ 96, 64}, | ||
| 127 | { 0, 32},{ 16, 32}, | ||
| 128 | { 0, 48},{ 0, 48},{ 16, 48},{ 32, 48},{ 64, 64},{ 32, 64},{ 16, 64},{ 0, 64}, | ||
| 129 | { 0, 0},{ 16, 0},{ 32, 0},{ 48, 0},{ 64, 0},{ 80, 0},{ 96, 0},{ 96, 16}, | ||
| 130 | { 0, 16},{ 16, 16}, | ||
| 131 | { 32, 16},{ 48, 16},{ 64, 16},{ 80, 16},{ 48, 32},{ 64, 32},{ 80, 32},{ 96, 32}, | ||
| 132 | |||
| 133 | {128, 0},{144, 0},{160, 0},{176, 0},{192, 0},{208, 0},{216, 0},{224, 0}, | ||
| 134 | {112, 0},{128, 16}, | ||
| 135 | {144, 16},{160, 16},{176, 16},{192, 16},{208, 16},{224, 16},{224, 32},{216, 32}, | ||
| 136 | {128, 32},{144, 32},{160, 32},{176, 32},{192, 32},{208, 32},{208, 48},{224, 48}, | ||
| 137 | {128, 48},{144, 48}, | ||
| 138 | {160, 48},{176, 48},{192, 48},{142, 64},{160, 64},{176, 64},{208, 64},{224, 64} | ||
| 139 | }, | ||
| 140 | { | ||
| 141 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
| 142 | 1, 4, | ||
| 143 | 4, 4, 1, 1, 1, 4, 4, 4, | ||
| 144 | |||
| 145 | 1, 4, 4, 4, 4, 4, 4, 4, | ||
| 146 | 1, 4, | ||
| 147 | 4, 4, 4, 4, 4, 4, 4, 4, | ||
| 148 | |||
| 149 | 4, 4, 4, 4, 4, 4, 1, 1, | ||
| 150 | 4, 4, | ||
| 151 | 4, 4, 4, 4, 4, 1, 1, 1, | ||
| 152 | |||
| 153 | 4, 4, 4, 4, 4, 4, 4, 1, | ||
| 154 | 1, 4, | ||
| 155 | 4, 4, 4, 4, 1, 1, 1, 1, | ||
| 156 | } | ||
| 157 | }; | ||
| 158 | #endif //RGB_MATRIX_ENABLE | ||
| 159 | |||
| 160 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 161 | if (record->event.pressed) { | ||
| 162 | switch(keycode) { | ||
| 163 | #if defined(RGB_MATRIX_DISABLE_KEYCODES) | ||
| 164 | case RGB_MATRIX_TOGGLE: // toggle rgb matrix | ||
| 165 | rgb_matrix_toggle(); | ||
| 166 | return false; | ||
| 167 | case RGB_MATRIX_STEP: | ||
| 168 | rgb_matrix_step(); | ||
| 169 | return false; | ||
| 170 | case RGB_MATRIX_INC_HUE: | ||
| 171 | rgb_matrix_increase_hue(); | ||
| 172 | return false; | ||
| 173 | case RGB_MATRIX_DEC_HUE: | ||
| 174 | rgb_matrix_decrease_hue(); | ||
| 175 | return false; | ||
| 176 | case RGB_MATRIX_INC_SAT: | ||
| 177 | rgb_matrix_increase_sat(); | ||
| 178 | return false; | ||
| 179 | case RGB_MATRIX_DEC_SAT: | ||
| 180 | rgb_matrix_decrease_sat(); | ||
| 181 | return false; | ||
| 182 | case RGB_MATRIX_INC_VAL: | ||
| 183 | rgb_matrix_increase_val(); | ||
| 184 | return false; | ||
| 185 | case RGB_MATRIX_DEC_VAL: | ||
| 186 | rgb_matrix_decrease_val(); | ||
| 187 | return false; | ||
| 188 | #endif | ||
| 189 | default: | ||
| 190 | break; | ||
| 191 | } | ||
| 192 | } | ||
| 193 | return true; | ||
| 194 | } | ||
diff --git a/keyboards/inett_studio/sqx/universal/universal.h b/keyboards/inett_studio/sqx/universal/universal.h new file mode 100644 index 000000000..b2df37ecc --- /dev/null +++ b/keyboards/inett_studio/sqx/universal/universal.h | |||
| @@ -0,0 +1,141 @@ | |||
| 1 | /** | ||
| 2 | * @file universal.h | ||
| 3 | * | ||
| 4 | Copyright 2020 astro <yuleiz@gmail.com> | ||
| 5 | |||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | This program is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | */ | ||
| 19 | #pragma once | ||
| 20 | |||
| 21 | #include "quantum.h" | ||
| 22 | |||
| 23 | // This a shortcut to help you visually see your layout. | ||
| 24 | // The first section contains all of the arguements | ||
| 25 | // The second converts the arguments into a two-dimensional array | ||
| 26 | #define LAYOUT_60_ansi( \ | ||
| 27 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ | ||
| 28 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
| 29 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
| 30 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ | ||
| 31 | k40, k42, k43, k47, k48, k49, k4a, k4b \ | ||
| 32 | ) \ | ||
| 33 | { \ | ||
| 34 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ | ||
| 35 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
| 36 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
| 37 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO}, \ | ||
| 38 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ | ||
| 39 | } | ||
| 40 | |||
| 41 | #define LAYOUT_60_iso( \ | ||
| 42 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ | ||
| 43 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ | ||
| 44 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, \ | ||
| 45 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ | ||
| 46 | k40, k42, k43, k47, k48, k49, k4a, k4b \ | ||
| 47 | ) \ | ||
| 48 | { \ | ||
| 49 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ | ||
| 50 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, KC_NO}, \ | ||
| 51 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e}, \ | ||
| 52 | {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO}, \ | ||
| 53 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ | ||
| 54 | } | ||
| 55 | |||
| 56 | #define LAYOUT_60_ansi_tsangan_split_rshift( \ | ||
| 57 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ | ||
| 58 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
| 59 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
| 60 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 61 | k40, k42, k43, k47, k49, k4a, k4b \ | ||
| 62 | ) \ | ||
| 63 | { \ | ||
| 64 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, KC_NO, k0e}, \ | ||
| 65 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
| 66 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
| 67 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
| 68 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ | ||
| 69 | } | ||
| 70 | |||
| 71 | #define LAYOUT_60_hhkb( \ | ||
| 72 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ | ||
| 73 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
| 74 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
| 75 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 76 | k42, k43, k47, k49, k4a \ | ||
| 77 | ) \ | ||
| 78 | { \ | ||
| 79 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ | ||
| 80 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
| 81 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
| 82 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
| 83 | {KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \ | ||
| 84 | } | ||
| 85 | #define LAYOUT_60_tsangan_hhkb( \ | ||
| 86 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ | ||
| 87 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
| 88 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
| 89 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 90 | k40, k42, k43, k47, k49, k4a, k4b \ | ||
| 91 | ) \ | ||
| 92 | { \ | ||
| 93 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ | ||
| 94 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
| 95 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
| 96 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
| 97 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ | ||
| 98 | } | ||
| 99 | |||
| 100 | #define LAYOUT_60_ansi_split_bs_rshift( \ | ||
| 101 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ | ||
| 102 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ | ||
| 103 | k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ | ||
| 104 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 105 | k40, k42, k43, k47, k48, k49, k4a, k4b \ | ||
| 106 | ) \ | ||
| 107 | { \ | ||
| 108 | {k00, k01, k02, k03, k04, k05, k06, k08, k09, k0a, k0b, k0c, k0d, k0e}, \ | ||
| 109 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ | ||
| 110 | {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, KC_NO, k2e}, \ | ||
| 111 | {k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
| 112 | {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, k07, KC_NO, KC_NO, k48, k49, k4a, k4b} \ | ||
| 113 | } | ||
| 114 | |||
| 115 | |||
| 116 | #if defined(RGB_MATRIX_DISABLE_KEYCODES) | ||
| 117 | # ifndef RGB_MATRIX_TOGGLE | ||
| 118 | # define RGB_MATRIX_TOGGLE KC_F16 | ||
| 119 | # endif | ||
| 120 | # ifndef RGB_MATRIX_STEP | ||
| 121 | # define RGB_MATRIX_STEP KC_F17 | ||
| 122 | # endif | ||
| 123 | # ifndef RGB_MATRIX_INC_HUE | ||
| 124 | # define RGB_MATRIX_INC_HUE KC_F18 | ||
| 125 | # endif | ||
| 126 | # ifndef RGB_MATRIX_DEC_HUE | ||
| 127 | # define RGB_MATRIX_DEC_HUE KC_F19 | ||
| 128 | # endif | ||
| 129 | # ifndef RGB_MATRIX_INC_SAT | ||
| 130 | # define RGB_MATRIX_INC_SAT KC_F20 | ||
| 131 | # endif | ||
| 132 | # ifndef RGB_MATRIX_DEC_SAT | ||
| 133 | # define RGB_MATRIX_DEC_SAT KC_F21 | ||
| 134 | # endif | ||
| 135 | # ifndef RGB_MATRIX_INC_VAL | ||
| 136 | # define RGB_MATRIX_INC_VAL KC_F22 | ||
| 137 | # endif | ||
| 138 | # ifndef RGB_MATRIX_DEC_VAL | ||
| 139 | # define RGB_MATRIX_DEC_VAL KC_F23 | ||
| 140 | # endif | ||
| 141 | #endif | ||
