diff options
| -rw-r--r-- | keyboards/sets3n/kk980/config.h | 103 | ||||
| -rw-r--r-- | keyboards/sets3n/kk980/info.json | 116 | ||||
| -rw-r--r-- | keyboards/sets3n/kk980/keymaps/default/keymap.c | 91 | ||||
| -rw-r--r-- | keyboards/sets3n/kk980/keymaps/via/keymap.c | 91 | ||||
| -rw-r--r-- | keyboards/sets3n/kk980/keymaps/via/rules.mk | 1 | ||||
| -rw-r--r-- | keyboards/sets3n/kk980/kk980.c | 17 | ||||
| -rw-r--r-- | keyboards/sets3n/kk980/kk980.h | 34 | ||||
| -rw-r--r-- | keyboards/sets3n/kk980/readme.md | 31 | ||||
| -rw-r--r-- | keyboards/sets3n/kk980/rules.mk | 21 |
9 files changed, 505 insertions, 0 deletions
diff --git a/keyboards/sets3n/kk980/config.h b/keyboards/sets3n/kk980/config.h new file mode 100644 index 000000000..016ab0d46 --- /dev/null +++ b/keyboards/sets3n/kk980/config.h | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | /* Copyright 2021 Sets3n | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #include "config_common.h" | ||
| 20 | |||
| 21 | /* USB Device descriptor parameter */ | ||
| 22 | #define VENDOR_ID 0x404A | ||
| 23 | #define PRODUCT_ID 0x0002 | ||
| 24 | #define DEVICE_VER 0x0001 | ||
| 25 | #define MANUFACTURER Sets3n | ||
| 26 | #define PRODUCT kk980 | ||
| 27 | |||
| 28 | /* key matrix size */ | ||
| 29 | #define MATRIX_ROWS 6 | ||
| 30 | #define MATRIX_COLS 17 | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Keyboard Matrix Assignments | ||
| 34 | * | ||
| 35 | * Change this to how you wired your keyboard | ||
| 36 | * COLS: AVR pins used for columns, left to right | ||
| 37 | * ROWS: AVR pins used for rows, top to bottom | ||
| 38 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 39 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 40 | * | ||
| 41 | */ | ||
| 42 | |||
| 43 | /* key matrix pins */ | ||
| 44 | #define MATRIX_ROW_PINS { B2, B3, D3, D4, D5, D6 } | ||
| 45 | #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, B1, B0, D0, D1 } | ||
| 46 | #define UNUSED_PINS | ||
| 47 | |||
| 48 | /* COL2ROW or ROW2COL */ | ||
| 49 | #define DIODE_DIRECTION COL2ROW | ||
| 50 | |||
| 51 | /* number of backlight levels */ | ||
| 52 | |||
| 53 | #ifdef BACKLIGHT_PIN | ||
| 54 | #define BACKLIGHT_LEVELS 8 | ||
| 55 | #endif | ||
| 56 | |||
| 57 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 58 | #define DEBOUNCE 5 | ||
| 59 | |||
| 60 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 61 | #define LOCKING_SUPPORT_ENABLE | ||
| 62 | |||
| 63 | /* Locking resynchronize hack */ | ||
| 64 | #define LOCKING_RESYNC_ENABLE | ||
| 65 | |||
| 66 | #define RGBLIGHT_EFFECT_BREATHING | ||
| 67 | #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
| 68 | #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
| 69 | #define RGBLIGHT_EFFECT_SNAKE | ||
| 70 | #define RGBLIGHT_EFFECT_KNIGHT | ||
| 71 | #define RGBLIGHT_EFFECT_CHRISTMAS | ||
| 72 | #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
| 73 | #define RGBLIGHT_EFFECT_RGB_TEST | ||
| 74 | #define RGBLIGHT_EFFECT_ALTERNATING | ||
| 75 | #define RGBLIGHT_EFFECT_TWINKLE | ||
| 76 | |||
| 77 | #define RGB_DI_PIN B7 | ||
| 78 | #ifdef RGB_DI_PIN | ||
| 79 | #define RGBLED_NUM 102 | ||
| 80 | #define RGBLIGHT_LED_MAP { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,\ | ||
| 81 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, \ | ||
| 82 | 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, \ | ||
| 83 | 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, \ | ||
| 84 | 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, \ | ||
| 85 | 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, \ | ||
| 86 | 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, \ | ||
| 87 | 96, 97, 98, 99, 100, 101, 102 } // 1 --> ScollLock 2 --> CapsLock 3 --> Bluetooth 4 --> NumLock | ||
| 88 | #define RGBLIGHT_HUE_STEP 8 | ||
| 89 | #define RGBLIGHT_SAT_STEP 8 | ||
| 90 | #define RGBLIGHT_VAL_STEP 8 | ||
| 91 | #define RGBLIGHT_LIMIT_VAL 230 | ||
| 92 | #define RGBLIGHT_LAYERS | ||
| 93 | #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF | ||
| 94 | #endif | ||
| 95 | |||
| 96 | #ifdef RGB_MATRIX_ENABLE | ||
| 97 | #define DRIVER_LED_TOTAL RGBLED_NUM | ||
| 98 | #define RGB_MATRIX_KEYPRESSES | ||
| 99 | #endif | ||
| 100 | |||
| 101 | #define BOOTMAGIC_LITE_ROW 0 | ||
| 102 | #define BOOTMAGIC_LITE_COLUMN 0 | ||
| 103 | |||
diff --git a/keyboards/sets3n/kk980/info.json b/keyboards/sets3n/kk980/info.json new file mode 100644 index 000000000..e6622d14b --- /dev/null +++ b/keyboards/sets3n/kk980/info.json | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "kk980", | ||
| 3 | "url": "https://i.imgur.com/MQA6FXb.jpg", | ||
| 4 | "maintainer": "Sets3n", | ||
| 5 | "layouts": { | ||
| 6 | "LAYOUT": { | ||
| 7 | "layout": [ | ||
| 8 | {"label":"ESC", "x": 0, "y": 0}, | ||
| 9 | {"label":"F1", "x": 2, "y": 0}, | ||
| 10 | {"label":"F2", "x": 3, "y": 0}, | ||
| 11 | {"label":"F3", "x": 4, "y": 0}, | ||
| 12 | {"label":"F4", "x": 5, "y": 0}, | ||
| 13 | {"label":"F5", "x": 6.5, "y": 0}, | ||
| 14 | {"label":"F6", "x": 7.5, "y": 0}, | ||
| 15 | {"label":"F7", "x": 8.5, "y": 0}, | ||
| 16 | {"label":"F8", "x": 9.5, "y": 0}, | ||
| 17 | {"label":"F9", "x": 11, "y": 0}, | ||
| 18 | {"label":"F10", "x": 12, "y": 0}, | ||
| 19 | {"label":"F11", "x": 13, "y": 0}, | ||
| 20 | {"label":"F12", "x": 14, "y": 0}, | ||
| 21 | {"label":"DEL", "x": 15.5, "y": 0}, | ||
| 22 | {"label":"INSERT", "x": 16.5, "y": 0}, | ||
| 23 | {"label":"PGUP", "x": 17.5, "y": 0}, | ||
| 24 | {"label":"PGDN", "x": 18.5, "y": 0}, | ||
| 25 | |||
| 26 | {"label":"`~", "x": 0, "y": 1.5}, | ||
| 27 | {"label":"1!", "x": 1, "y": 1.5}, | ||
| 28 | {"label":"2@", "x": 2, "y": 1.5}, | ||
| 29 | {"label":"3#", "x": 3, "y": 1.5}, | ||
| 30 | {"label":"4$", "x": 4, "y": 1.5}, | ||
| 31 | {"label":"5%", "x": 5, "y": 1.5}, | ||
| 32 | {"label":"6^", "x": 6, "y": 1.5}, | ||
| 33 | {"label":"7&", "x": 7, "y": 1.5}, | ||
| 34 | {"label":"8*", "x": 8, "y": 1.5}, | ||
| 35 | {"label":"9(", "x": 9, "y": 1.5}, | ||
| 36 | {"label":"0)", "x": 10, "y": 1.5}, | ||
| 37 | {"label":"-_", "x": 11, "y": 1.5}, | ||
| 38 | {"label":"+=", "x": 12, "y": 1.5}, | ||
| 39 | {"label":"BS", "x": 13, "y": 1.5, "w": 2}, | ||
| 40 | {"label":"NUML", "x": 15.5, "y": 1.5}, | ||
| 41 | {"label":"/", "x": 16.5, "y": 1.5}, | ||
| 42 | {"label":"*", "x": 17.5, "y": 1.5}, | ||
| 43 | {"label":"-", "x": 18.5, "y": 1.5}, | ||
| 44 | |||
| 45 | {"label":"TAB", "x": 0, "y": 2.5, "w": 1.5}, | ||
| 46 | {"label":"Q", "x": 1.5, "y": 2.5}, | ||
| 47 | {"label":"W", "x": 2.5, "y": 2.5}, | ||
| 48 | {"label":"E", "x": 3.5, "y": 2.5}, | ||
| 49 | {"label":"R", "x": 4.5, "y": 2.5}, | ||
| 50 | {"label":"T", "x": 5.5, "y": 2.5}, | ||
| 51 | {"label":"Y", "x": 6.5, "y": 2.5}, | ||
| 52 | {"label":"U", "x": 7.5, "y": 2.5}, | ||
| 53 | {"label":"I", "x": 8.5, "y": 2.5}, | ||
| 54 | {"label":"O", "x": 9.5, "y": 2.5}, | ||
| 55 | {"label":"P", "x": 10.5, "y": 2.5}, | ||
| 56 | {"label":"[{", "x": 11.5, "y": 2.5}, | ||
| 57 | {"label":"]}", "x": 12.5, "y": 2.5}, | ||
| 58 | {"label":"\\|", "x": 13.5, "y": 2.5, "w": 1.5}, | ||
| 59 | {"label":"7", "x": 15.5, "y": 2.5}, | ||
| 60 | {"label":"8", "x": 16.5, "y": 2.5}, | ||
| 61 | {"label":"9", "x": 17.5, "y": 2.5}, | ||
| 62 | |||
| 63 | {"label":"CAPS", "x": 0, "y": 3.5, "w": 1.75}, | ||
| 64 | {"label":"A", "x": 1.75, "y": 3.5}, | ||
| 65 | {"label":"S", "x": 2.75, "y": 3.5}, | ||
| 66 | {"label":"D", "x": 3.75, "y": 3.5}, | ||
| 67 | {"label":"F", "x": 4.75, "y": 3.5}, | ||
| 68 | {"label":"G", "x": 5.75, "y": 3.5}, | ||
| 69 | {"label":"H", "x": 6.75, "y": 3.5}, | ||
| 70 | {"label":"J", "x": 7.75, "y": 3.5}, | ||
| 71 | {"label":"K", "x": 8.75, "y": 3.5}, | ||
| 72 | {"label":"L", "x": 9.75, "y": 3.5}, | ||
| 73 | {"label":";:", "x": 10.75, "y": 3.5}, | ||
| 74 | {"label":"'\"", "x": 11.75, "y": 3.5}, | ||
| 75 | {"label":"RETURN", "x": 12.75, "y": 3.5, "w": 2.25}, | ||
| 76 | {"label":"4", "x": 15.5, "y": 3.5, "w": 1.5}, | ||
| 77 | {"label":"5", "x": 16.5, "y": 3.5}, | ||
| 78 | {"label":"6", "x": 17.5, "y": 3.5}, | ||
| 79 | {"label":"+", "x": 18.5, "y": 3.5, "h": 2}, | ||
| 80 | |||
| 81 | {"label":"LSHIFT", "x": 0, "y": 4.5, "w": 2.25}, | ||
| 82 | {"label":"Z", "x": 2.25, "y": 4.5}, | ||
| 83 | {"label":"X", "x": 3.25, "y": 4.5}, | ||
| 84 | {"label":"C", "x": 4.25, "y": 4.5}, | ||
| 85 | {"label":"V", "x": 5.25, "y": 4.5}, | ||
| 86 | {"label":"B", "x": 6.25, "y": 4.5}, | ||
| 87 | {"label":"N", "x": 7.25, "y": 4.5}, | ||
| 88 | {"label":"M", "x": 8.25, "y": 4.5}, | ||
| 89 | {"label":",<", "x": 9.25, "y": 4.5}, | ||
| 90 | {"label":".>", "x": 10.25, "y": 4.5}, | ||
| 91 | {"label":"/?", "x": 11.25, "y": 4.5}, | ||
| 92 | {"label":"RSHIFT", "x": 12.25, "y": 4.5, "w": 1.75}, | ||
| 93 | {"label":"up", "x": 14.25, "y": 4.75}, | ||
| 94 | {"label":"1", "x": 15.5, "y": 4.5}, | ||
| 95 | {"label":"2", "x": 16.5, "y": 4.5}, | ||
| 96 | {"label":"3", "x": 17.5, "y": 4.5}, | ||
| 97 | |||
| 98 | {"label":"LCTRL", "x": 0, "y": 5.5, "w": 1.25}, | ||
| 99 | {"label":"LWIN", "x": 1.25, "y": 5.5}, | ||
| 100 | {"label":"LALT", "x": 2.25, "y": 5.5, "w": 1.25}, | ||
| 101 | {"label":"SPACE", "x": 3.25, "y": 5.5, "w": 6.25}, | ||
| 102 | {"label":"RALT", "x": 9.5, "y": 5.5}, | ||
| 103 | {"label":"FN", "x": 10.5, "y": 5.5}, | ||
| 104 | {"label":"RCTRL", "x": 11.5, "y": 5.5, "w": 1.25}, | ||
| 105 | {"label":"LEFT", "x": 13, "y": 5.75}, | ||
| 106 | {"label":"DOWN", "x": 14, "y": 5.75}, | ||
| 107 | {"label":"RIGHT", "x": 15, "y": 5.75}, | ||
| 108 | {"label":"0", "x": 16.5, "y": 5.5}, | ||
| 109 | {"label":".DEL", "x": 17.5, "y": 5.5, "w": 2.75}, | ||
| 110 | {"label":"ENTER", "x": 18.5, "y": 5.5, "h": 2} | ||
| 111 | |||
| 112 | ] | ||
| 113 | } | ||
| 114 | } | ||
| 115 | } | ||
| 116 | |||
diff --git a/keyboards/sets3n/kk980/keymaps/default/keymap.c b/keyboards/sets3n/kk980/keymaps/default/keymap.c new file mode 100644 index 000000000..171cdb212 --- /dev/null +++ b/keyboards/sets3n/kk980/keymaps/default/keymap.c | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | /* Copyright 2021 Sets3n | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | |||
| 21 | [0] = LAYOUT( | ||
| 22 | KC_ESC, 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_DEL, KC_INS, KC_PGDN, KC_PGUP, | ||
| 23 | KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 24 | 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_P7, KC_P8, KC_P9, | ||
| 25 | 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, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 26 | 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_UP, KC_P1, KC_P2, KC_P3, | ||
| 27 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, KC_BSLS, KC_RALT, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), | ||
| 28 | |||
| 29 | [1] = LAYOUT( | ||
| 30 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 31 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 32 | KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 33 | KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 36 | |||
| 37 | |||
| 38 | }; | ||
| 39 | |||
| 40 | |||
| 41 | //以下是RGB灯作为层切换指示 | ||
| 42 | const rgblight_segment_t PROGMEM my_scroll_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 43 | {1, 1, HSV_CYAN} | ||
| 44 | ); | ||
| 45 | |||
| 46 | const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 47 | {2, 1, HSV_MAGENTA}, | ||
| 48 | {56, 1, HSV_CYAN} | ||
| 49 | ); | ||
| 50 | |||
| 51 | |||
| 52 | const rgblight_segment_t PROGMEM my_bluetooth_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 53 | {3, 1, HSV_WHITE} | ||
| 54 | ); | ||
| 55 | |||
| 56 | const rgblight_segment_t PROGMEM my_numlocak_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 57 | {4, 1, HSV_GREEN}, | ||
| 58 | {35, 1, HSV_RED} | ||
| 59 | ); | ||
| 60 | |||
| 61 | // Define the array of layers. Later layers take precedence | ||
| 62 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
| 63 | my_scroll_layer, | ||
| 64 | my_capslock_layer, | ||
| 65 | my_bluetooth_layer, | ||
| 66 | my_numlocak_layer | ||
| 67 | ); | ||
| 68 | |||
| 69 | void keyboard_post_init_user(void){ | ||
| 70 | //Enable the LED layers | ||
| 71 | rgblight_layers = my_rgb_layers; | ||
| 72 | } | ||
| 73 | |||
| 74 | // Enabling and disabling lighting layers | ||
| 75 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 76 | // Both layers will light up if both kb layers are active | ||
| 77 | rgblight_set_layer_state(0, layer_state_cmp(state, 0)); | ||
| 78 | rgblight_set_layer_state(1, layer_state_cmp(state, 1)); | ||
| 79 | rgblight_set_layer_state(3, layer_state_cmp(state, 3)); | ||
| 80 | |||
| 81 | return state; | ||
| 82 | } | ||
| 83 | |||
| 84 | bool led_update_user(led_t led_state) { | ||
| 85 | rgblight_set_layer_state(0, led_state.scroll_lock); | ||
| 86 | rgblight_set_layer_state(1, led_state.caps_lock); | ||
| 87 | rgblight_set_layer_state(3, led_state.num_lock); | ||
| 88 | |||
| 89 | return true; | ||
| 90 | } | ||
| 91 | |||
diff --git a/keyboards/sets3n/kk980/keymaps/via/keymap.c b/keyboards/sets3n/kk980/keymaps/via/keymap.c new file mode 100644 index 000000000..171cdb212 --- /dev/null +++ b/keyboards/sets3n/kk980/keymaps/via/keymap.c | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | /* Copyright 2021 Sets3n | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | |||
| 21 | [0] = LAYOUT( | ||
| 22 | KC_ESC, 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_DEL, KC_INS, KC_PGDN, KC_PGUP, | ||
| 23 | KC_GRV, 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_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
| 24 | 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_P7, KC_P8, KC_P9, | ||
| 25 | 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, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
| 26 | 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_UP, KC_P1, KC_P2, KC_P3, | ||
| 27 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, KC_BSLS, KC_RALT, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), | ||
| 28 | |||
| 29 | [1] = LAYOUT( | ||
| 30 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 31 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 32 | KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 33 | KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 35 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | ||
| 36 | |||
| 37 | |||
| 38 | }; | ||
| 39 | |||
| 40 | |||
| 41 | //以下是RGB灯作为层切换指示 | ||
| 42 | const rgblight_segment_t PROGMEM my_scroll_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 43 | {1, 1, HSV_CYAN} | ||
| 44 | ); | ||
| 45 | |||
| 46 | const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 47 | {2, 1, HSV_MAGENTA}, | ||
| 48 | {56, 1, HSV_CYAN} | ||
| 49 | ); | ||
| 50 | |||
| 51 | |||
| 52 | const rgblight_segment_t PROGMEM my_bluetooth_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 53 | {3, 1, HSV_WHITE} | ||
| 54 | ); | ||
| 55 | |||
| 56 | const rgblight_segment_t PROGMEM my_numlocak_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 57 | {4, 1, HSV_GREEN}, | ||
| 58 | {35, 1, HSV_RED} | ||
| 59 | ); | ||
| 60 | |||
| 61 | // Define the array of layers. Later layers take precedence | ||
| 62 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
| 63 | my_scroll_layer, | ||
| 64 | my_capslock_layer, | ||
| 65 | my_bluetooth_layer, | ||
| 66 | my_numlocak_layer | ||
| 67 | ); | ||
| 68 | |||
| 69 | void keyboard_post_init_user(void){ | ||
| 70 | //Enable the LED layers | ||
| 71 | rgblight_layers = my_rgb_layers; | ||
| 72 | } | ||
| 73 | |||
| 74 | // Enabling and disabling lighting layers | ||
| 75 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 76 | // Both layers will light up if both kb layers are active | ||
| 77 | rgblight_set_layer_state(0, layer_state_cmp(state, 0)); | ||
| 78 | rgblight_set_layer_state(1, layer_state_cmp(state, 1)); | ||
| 79 | rgblight_set_layer_state(3, layer_state_cmp(state, 3)); | ||
| 80 | |||
| 81 | return state; | ||
| 82 | } | ||
| 83 | |||
| 84 | bool led_update_user(led_t led_state) { | ||
| 85 | rgblight_set_layer_state(0, led_state.scroll_lock); | ||
| 86 | rgblight_set_layer_state(1, led_state.caps_lock); | ||
| 87 | rgblight_set_layer_state(3, led_state.num_lock); | ||
| 88 | |||
| 89 | return true; | ||
| 90 | } | ||
| 91 | |||
diff --git a/keyboards/sets3n/kk980/keymaps/via/rules.mk b/keyboards/sets3n/kk980/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/sets3n/kk980/keymaps/via/rules.mk | |||
| @@ -0,0 +1 @@ | |||
| VIA_ENABLE = yes | |||
diff --git a/keyboards/sets3n/kk980/kk980.c b/keyboards/sets3n/kk980/kk980.c new file mode 100644 index 000000000..d5254b3fc --- /dev/null +++ b/keyboards/sets3n/kk980/kk980.c | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | /* Copyright 2021 Sets3n | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include "kk980.h" | ||
diff --git a/keyboards/sets3n/kk980/kk980.h b/keyboards/sets3n/kk980/kk980.h new file mode 100644 index 000000000..238d124be --- /dev/null +++ b/keyboards/sets3n/kk980/kk980.h | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | /* Copyright 2021 Sets3n | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #pragma once | ||
| 17 | |||
| 18 | #include "quantum.h" | ||
| 19 | |||
| 20 | #define LAYOUT( \ | ||
| 21 | K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, \ | ||
| 22 | K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, \ | ||
| 23 | K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ | ||
| 24 | K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, \ | ||
| 25 | K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, \ | ||
| 26 | K500, K501, K502, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516 \ | ||
| 27 | ) { \ | ||
| 28 | { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016 }, \ | ||
| 29 | { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116 }, \ | ||
| 30 | { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, KC_NO }, \ | ||
| 31 | { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316 }, \ | ||
| 32 | { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, KC_NO }, \ | ||
| 33 | { K500, K501, K502, KC_NO, KC_NO, K505, K506, K507, K508, K509, K510, K511, K512, K513, K514, K515, K516 } \ | ||
| 34 | } | ||
diff --git a/keyboards/sets3n/kk980/readme.md b/keyboards/sets3n/kk980/readme.md new file mode 100644 index 000000000..0a1142e57 --- /dev/null +++ b/keyboards/sets3n/kk980/readme.md | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | # kk980 | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | A hotswap 98% RGB Mechanical keyboard. | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [sets3n](https://github.com/sets3n) | ||
| 8 | * Hardware Supported: kk980 PCB | ||
| 9 | * Hardware Availability: - | ||
| 10 | |||
| 11 | ## Bootloader | ||
| 12 | |||
| 13 | Enter the bootloader in 3 ways: | ||
| 14 | |||
| 15 | * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard | ||
| 16 | * **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead | ||
| 17 | * **Keycode in layout**: Press the key mapped to `RESET` if it is available | ||
| 18 | |||
| 19 | ## HEX | ||
| 20 | |||
| 21 | Make example for this keyboard (after setting up your build environment): | ||
| 22 | |||
| 23 | make sets3n/kk980:default | ||
| 24 | |||
| 25 | ## FLASH | ||
| 26 | |||
| 27 | Flashing example for this keyboard: | ||
| 28 | |||
| 29 | make sets3n/kk980:default:flash | ||
| 30 | |||
| 31 | 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/sets3n/kk980/rules.mk b/keyboards/sets3n/kk980/rules.mk new file mode 100644 index 000000000..104765860 --- /dev/null +++ b/keyboards/sets3n/kk980/rules.mk | |||
| @@ -0,0 +1,21 @@ | |||
| 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 = yes # Enable Bootmagic Lite | ||
| 11 | MOUSEKEY_ENABLE = yes # 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 | AUDIO_ENABLE = no # Audio output | ||
