diff options
Diffstat (limited to 'keyboards/keychron/v2')
22 files changed, 471 insertions, 437 deletions
diff --git a/keyboards/keychron/v2/ansi/info.json b/keyboards/keychron/v2/ansi/info.json index f0bb49cee2..7d844d0c1d 100644 --- a/keyboards/keychron/v2/ansi/info.json +++ b/keyboards/keychron/v2/ansi/info.json @@ -8,82 +8,90 @@ "pid": "0x0320", "device_version": "1.0.0" }, + "rgb_matrix": { + "driver": "CKLED2001" + }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { "LAYOUT_ansi_67": { "layout": [ - {"matrix":[0, 0], "x":0, "y":0.25}, - {"matrix":[0, 1], "x":1, "y":0.25}, - {"matrix":[0, 2], "x":2, "y":0.25}, - {"matrix":[0, 3], "x":3, "y":0.25}, - {"matrix":[0, 4], "x":4, "y":0.25}, - {"matrix":[0, 5], "x":5, "y":0.25}, - {"matrix":[0, 6], "x":6, "y":0.25}, - {"matrix":[0, 7], "x":7, "y":0.25}, - {"matrix":[0, 8], "x":8, "y":0.25}, - {"matrix":[0, 9], "x":9, "y":0.25}, - {"matrix":[0,10], "x":10, "y":0.25}, - {"matrix":[0,11], "x":11, "y":0.25}, - {"matrix":[0,12], "x":12, "y":0.25}, - {"matrix":[0,13], "x":13, "y":0.25, "w":2}, - {"matrix":[0,14], "x":15.25, "y":0}, + {"matrix": [0, 0], "x": 0, "y": 0.25}, + {"matrix": [0, 1], "x": 1, "y": 0.25}, + {"matrix": [0, 2], "x": 2, "y": 0.25}, + {"matrix": [0, 3], "x": 3, "y": 0.25}, + {"matrix": [0, 4], "x": 4, "y": 0.25}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [0, 6], "x": 6, "y": 0.25}, + {"matrix": [0, 7], "x": 7, "y": 0.25}, + {"matrix": [0, 8], "x": 8, "y": 0.25}, + {"matrix": [0, 9], "x": 9, "y": 0.25}, + {"matrix": [0, 10], "x": 10, "y": 0.25}, + {"matrix": [0, 11], "x": 11, "y": 0.25}, + {"matrix": [0, 12], "x": 12, "y": 0.25}, + {"matrix": [0, 13], "x": 13, "y": 0.25, "w": 2}, + {"matrix": [0, 14], "x": 15.25, "y": 0}, - {"matrix":[1, 0], "x":0, "y":1.25, "w":1.5}, - {"matrix":[1, 1], "x":1.5, "y":1.25}, - {"matrix":[1, 2], "x":2.5, "y":1.25}, - {"matrix":[1, 3], "x":3.5, "y":1.25}, - {"matrix":[1, 4], "x":4.5, "y":1.25}, - {"matrix":[1, 5], "x":5.5, "y":1.25}, - {"matrix":[1, 6], "x":6.5, "y":1.25}, - {"matrix":[1, 7], "x":7.5, "y":1.25}, - {"matrix":[1, 8], "x":8.5, "y":1.25}, - {"matrix":[1, 9], "x":9.5, "y":1.25}, - {"matrix":[1,10], "x":10.5, "y":1.25}, - {"matrix":[1,11], "x":11.5, "y":1.25}, - {"matrix":[1,12], "x":12.5, "y":1.25}, - {"matrix":[1,13], "x":13.5, "y":1.25, "w":1.5}, - {"matrix":[1,14], "x":15.25, "y":1.25}, + {"matrix": [1, 0], "x": 0, "y": 1.25, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1.25}, + {"matrix": [1, 2], "x": 2.5, "y": 1.25}, + {"matrix": [1, 3], "x": 3.5, "y": 1.25}, + {"matrix": [1, 4], "x": 4.5, "y": 1.25}, + {"matrix": [1, 5], "x": 5.5, "y": 1.25}, + {"matrix": [1, 6], "x": 6.5, "y": 1.25}, + {"matrix": [1, 7], "x": 7.5, "y": 1.25}, + {"matrix": [1, 8], "x": 8.5, "y": 1.25}, + {"matrix": [1, 9], "x": 9.5, "y": 1.25}, + {"matrix": [1, 10], "x": 10.5, "y": 1.25}, + {"matrix": [1, 11], "x": 11.5, "y": 1.25}, + {"matrix": [1, 12], "x": 12.5, "y": 1.25}, + {"matrix": [1, 13], "x": 13.5, "y": 1.25, "w": 1.5}, + {"matrix": [1, 14], "x": 15.25, "y": 1.25}, - {"matrix":[2, 0], "x":0, "y":2.25, "w":1.75}, - {"matrix":[2, 1], "x":1.75, "y":2.25}, - {"matrix":[2, 2], "x":2.75, "y":2.25}, - {"matrix":[2, 3], "x":3.75, "y":2.25}, - {"matrix":[2, 4], "x":4.75, "y":2.25}, - {"matrix":[2, 5], "x":5.75, "y":2.25}, - {"matrix":[2, 6], "x":6.75, "y":2.25}, - {"matrix":[2, 7], "x":7.75, "y":2.25}, - {"matrix":[2, 8], "x":8.75, "y":2.25}, - {"matrix":[2, 9], "x":9.75, "y":2.25}, - {"matrix":[2,10], "x":10.75, "y":2.25}, - {"matrix":[2,11], "x":11.75, "y":2.25}, - {"matrix":[2,13], "x":12.75, "y":2.25, "w":2.25}, - {"matrix":[2,14], "x":15.25, "y":2.25}, + {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2.25}, + {"matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"matrix": [2, 8], "x": 8.75, "y": 2.25}, + {"matrix": [2, 9], "x": 9.75, "y": 2.25}, + {"matrix": [2, 10], "x": 10.75, "y": 2.25}, + {"matrix": [2, 11], "x": 11.75, "y": 2.25}, + {"matrix": [2, 13], "x": 12.75, "y": 2.25, "w": 2.25}, + {"matrix": [2, 14], "x": 15.25, "y": 2.25}, - {"matrix":[3, 0], "x":0, "y":3.25, "w":2.25}, - {"matrix":[3, 2], "x":2.25, "y":3.25}, - {"matrix":[3, 3], "x":3.25, "y":3.25}, - {"matrix":[3, 4], "x":4.25, "y":3.25}, - {"matrix":[3, 5], "x":5.25, "y":3.25}, - {"matrix":[3, 6], "x":6.25, "y":3.25}, - {"matrix":[3, 7], "x":7.25, "y":3.25}, - {"matrix":[3, 8], "x":8.25, "y":3.25}, - {"matrix":[3, 9], "x":9.25, "y":3.25}, - {"matrix":[3,10], "x":10.25, "y":3.25}, - {"matrix":[3,11], "x":11.25, "y":3.25}, - {"matrix":[3,13], "x":12.25, "y":3.25, "w":1.75}, - {"matrix":[3,14], "x":14.25, "y":3.5}, + {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 2.25}, + {"matrix": [3, 2], "x": 2.25, "y": 3.25}, + {"matrix": [3, 3], "x": 3.25, "y": 3.25}, + {"matrix": [3, 4], "x": 4.25, "y": 3.25}, + {"matrix": [3, 5], "x": 5.25, "y": 3.25}, + {"matrix": [3, 6], "x": 6.25, "y": 3.25}, + {"matrix": [3, 7], "x": 7.25, "y": 3.25}, + {"matrix": [3, 8], "x": 8.25, "y": 3.25}, + {"matrix": [3, 9], "x": 9.25, "y": 3.25}, + {"matrix": [3, 10], "x": 10.25, "y": 3.25}, + {"matrix": [3, 11], "x": 11.25, "y": 3.25}, + {"matrix": [3, 13], "x": 12.25, "y": 3.25, "w": 1.75}, + {"matrix": [3, 14], "x": 14.25, "y": 3.5}, - {"matrix":[4, 0], "x":0, "y":4.25, "w":1.25}, - {"matrix":[4, 1], "x":1.25, "y":4.25, "w":1.25}, - {"matrix":[4, 2], "x":2.5, "y":4.25, "w":1.25}, - {"matrix":[4, 6], "x":3.75, "y":4.25, "w":6.25}, - {"matrix":[4,10], "x":10, "y":4.25}, - {"matrix":[4,11], "x":11, "y":4.25}, - {"matrix":[4,12], "x":12, "y":4.25}, - {"matrix":[4,13], "x":13.25, "y":4.5}, - {"matrix":[2,12], "x":14.25, "y":4.5}, - {"matrix":[4,14], "x":15.25, "y":4.5} + {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4.25, "w": 1.25}, + {"matrix": [4, 6], "x": 3.75, "y": 4.25, "w": 6.25}, + {"matrix": [4, 10], "x": 10, "y": 4.25}, + {"matrix": [4, 11], "x": 11, "y": 4.25}, + {"matrix": [4, 12], "x": 12, "y": 4.25}, + {"matrix": [4, 13], "x": 13.25, "y": 4.5}, + {"matrix": [2, 12], "x": 14.25, "y": 4.5}, + {"matrix": [4, 14], "x": 15.25, "y": 4.5} ] } } diff --git a/keyboards/keychron/v2/ansi/rules.mk b/keyboards/keychron/v2/ansi/rules.mk index 345807d824..2b4a67b1ee 100644 --- a/keyboards/keychron/v2/ansi/rules.mk +++ b/keyboards/keychron/v2/ansi/rules.mk @@ -12,7 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output DIP_SWITCH_ENABLE = yes RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = CKLED2001 EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = embedded_flash diff --git a/keyboards/keychron/v2/ansi_encoder/info.json b/keyboards/keychron/v2/ansi_encoder/info.json index 1e729eb636..8de781ab9c 100644 --- a/keyboards/keychron/v2/ansi_encoder/info.json +++ b/keyboards/keychron/v2/ansi_encoder/info.json @@ -8,6 +8,14 @@ "pid": "0x0321", "device_version": "1.0.0" }, + "rgb_matrix": { + "driver": "CKLED2001" + }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A10", "pin_b": "B5"} @@ -18,77 +26,77 @@ "layouts": { "LAYOUT_ansi_67": { "layout": [ - {"matrix":[0, 0], "x":0, "y":0.25}, - {"matrix":[0, 1], "x":1, "y":0.25}, - {"matrix":[0, 2], "x":2, "y":0.25}, - {"matrix":[0, 3], "x":3, "y":0.25}, - {"matrix":[0, 4], "x":4, "y":0.25}, - {"matrix":[0, 5], "x":5, "y":0.25}, - {"matrix":[0, 6], "x":6, "y":0.25}, - {"matrix":[0, 7], "x":7, "y":0.25}, - {"matrix":[0, 8], "x":8, "y":0.25}, - {"matrix":[0, 9], "x":9, "y":0.25}, - {"matrix":[0,10], "x":10, "y":0.25}, - {"matrix":[0,11], "x":11, "y":0.25}, - {"matrix":[0,12], "x":12, "y":0.25}, - {"matrix":[0,13], "x":13, "y":0.25, "w":2}, - {"matrix":[0,14], "x":15.25, "y":0}, + {"matrix": [0, 0], "x": 0, "y": 0.25}, + {"matrix": [0, 1], "x": 1, "y": 0.25}, + {"matrix": [0, 2], "x": 2, "y": 0.25}, + {"matrix": [0, 3], "x": 3, "y": 0.25}, + {"matrix": [0, 4], "x": 4, "y": 0.25}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [0, 6], "x": 6, "y": 0.25}, + {"matrix": [0, 7], "x": 7, "y": 0.25}, + {"matrix": [0, 8], "x": 8, "y": 0.25}, + {"matrix": [0, 9], "x": 9, "y": 0.25}, + {"matrix": [0, 10], "x": 10, "y": 0.25}, + {"matrix": [0, 11], "x": 11, "y": 0.25}, + {"matrix": [0, 12], "x": 12, "y": 0.25}, + {"matrix": [0, 13], "x": 13, "y": 0.25, "w": 2}, + {"matrix": [0, 14], "x": 15.25, "y": 0}, - {"matrix":[1, 0], "x":0, "y":1.25, "w":1.5}, - {"matrix":[1, 1], "x":1.5, "y":1.25}, - {"matrix":[1, 2], "x":2.5, "y":1.25}, - {"matrix":[1, 3], "x":3.5, "y":1.25}, - {"matrix":[1, 4], "x":4.5, "y":1.25}, - {"matrix":[1, 5], "x":5.5, "y":1.25}, - {"matrix":[1, 6], "x":6.5, "y":1.25}, - {"matrix":[1, 7], "x":7.5, "y":1.25}, - {"matrix":[1, 8], "x":8.5, "y":1.25}, - {"matrix":[1, 9], "x":9.5, "y":1.25}, - {"matrix":[1,10], "x":10.5, "y":1.25}, - {"matrix":[1,11], "x":11.5, "y":1.25}, - {"matrix":[1,12], "x":12.5, "y":1.25}, - {"matrix":[1,13], "x":13.5, "y":1.25, "w":1.5}, - {"matrix":[1,14], "x":15.25, "y":1.25}, + {"matrix": [1, 0], "x": 0, "y": 1.25, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1.25}, + {"matrix": [1, 2], "x": 2.5, "y": 1.25}, + {"matrix": [1, 3], "x": 3.5, "y": 1.25}, + {"matrix": [1, 4], "x": 4.5, "y": 1.25}, + {"matrix": [1, 5], "x": 5.5, "y": 1.25}, + {"matrix": [1, 6], "x": 6.5, "y": 1.25}, + {"matrix": [1, 7], "x": 7.5, "y": 1.25}, + {"matrix": [1, 8], "x": 8.5, "y": 1.25}, + {"matrix": [1, 9], "x": 9.5, "y": 1.25}, + {"matrix": [1, 10], "x": 10.5, "y": 1.25}, + {"matrix": [1, 11], "x": 11.5, "y": 1.25}, + {"matrix": [1, 12], "x": 12.5, "y": 1.25}, + {"matrix": [1, 13], "x": 13.5, "y": 1.25, "w": 1.5}, + {"matrix": [1, 14], "x": 15.25, "y": 1.25}, - {"matrix":[2, 0], "x":0, "y":2.25, "w":1.75}, - {"matrix":[2, 1], "x":1.75, "y":2.25}, - {"matrix":[2, 2], "x":2.75, "y":2.25}, - {"matrix":[2, 3], "x":3.75, "y":2.25}, - {"matrix":[2, 4], "x":4.75, "y":2.25}, - {"matrix":[2, 5], "x":5.75, "y":2.25}, - {"matrix":[2, 6], "x":6.75, "y":2.25}, - {"matrix":[2, 7], "x":7.75, "y":2.25}, - {"matrix":[2, 8], "x":8.75, "y":2.25}, - {"matrix":[2, 9], "x":9.75, "y":2.25}, - {"matrix":[2,10], "x":10.75, "y":2.25}, - {"matrix":[2,11], "x":11.75, "y":2.25}, - {"matrix":[2,13], "x":12.75, "y":2.25, "w":2.25}, - {"matrix":[2,14], "x":15.25, "y":2.25}, + {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2.25}, + {"matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"matrix": [2, 8], "x": 8.75, "y": 2.25}, + {"matrix": [2, 9], "x": 9.75, "y": 2.25}, + {"matrix": [2, 10], "x": 10.75, "y": 2.25}, + {"matrix": [2, 11], "x": 11.75, "y": 2.25}, + {"matrix": [2, 13], "x": 12.75, "y": 2.25, "w": 2.25}, + {"matrix": [2, 14], "x": 15.25, "y": 2.25}, - {"matrix":[3, 0], "x":0, "y":3.25, "w":2.25}, - {"matrix":[3, 2], "x":2.25, "y":3.25}, - {"matrix":[3, 3], "x":3.25, "y":3.25}, - {"matrix":[3, 4], "x":4.25, "y":3.25}, - {"matrix":[3, 5], "x":5.25, "y":3.25}, - {"matrix":[3, 6], "x":6.25, "y":3.25}, - {"matrix":[3, 7], "x":7.25, "y":3.25}, - {"matrix":[3, 8], "x":8.25, "y":3.25}, - {"matrix":[3, 9], "x":9.25, "y":3.25}, - {"matrix":[3,10], "x":10.25, "y":3.25}, - {"matrix":[3,11], "x":11.25, "y":3.25}, - {"matrix":[3,13], "x":12.25, "y":3.25, "w":1.75}, - {"matrix":[3,14], "x":14.25, "y":3.5}, + {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 2.25}, + {"matrix": [3, 2], "x": 2.25, "y": 3.25}, + {"matrix": [3, 3], "x": 3.25, "y": 3.25}, + {"matrix": [3, 4], "x": 4.25, "y": 3.25}, + {"matrix": [3, 5], "x": 5.25, "y": 3.25}, + {"matrix": [3, 6], "x": 6.25, "y": 3.25}, + {"matrix": [3, 7], "x": 7.25, "y": 3.25}, + {"matrix": [3, 8], "x": 8.25, "y": 3.25}, + {"matrix": [3, 9], "x": 9.25, "y": 3.25}, + {"matrix": [3, 10], "x": 10.25, "y": 3.25}, + {"matrix": [3, 11], "x": 11.25, "y": 3.25}, + {"matrix": [3, 13], "x": 12.25, "y": 3.25, "w": 1.75}, + {"matrix": [3, 14], "x": 14.25, "y": 3.5}, - {"matrix":[4, 0], "x":0, "y":4.25, "w":1.25}, - {"matrix":[4, 1], "x":1.25, "y":4.25, "w":1.25}, - {"matrix":[4, 2], "x":2.5, "y":4.25, "w":1.25}, - {"matrix":[4, 6], "x":3.75, "y":4.25, "w":6.25}, - {"matrix":[4,10], "x":10, "y":4.25}, - {"matrix":[4,11], "x":11, "y":4.25}, - {"matrix":[4,12], "x":12, "y":4.25}, - {"matrix":[4,13], "x":13.25, "y":4.5}, - {"matrix":[2,12], "x":14.25, "y":4.5}, - {"matrix":[4,14], "x":15.25, "y":4.5} + {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4.25, "w": 1.25}, + {"matrix": [4, 6], "x": 3.75, "y": 4.25, "w": 6.25}, + {"matrix": [4, 10], "x": 10, "y": 4.25}, + {"matrix": [4, 11], "x": 11, "y": 4.25}, + {"matrix": [4, 12], "x": 12, "y": 4.25}, + {"matrix": [4, 13], "x": 13.25, "y": 4.5}, + {"matrix": [2, 12], "x": 14.25, "y": 4.5}, + {"matrix": [4, 14], "x": 15.25, "y": 4.5} ] } } diff --git a/keyboards/keychron/v2/ansi_encoder/keymaps/default/keymap.c b/keyboards/keychron/v2/ansi_encoder/keymaps/default/keymap.c index 0385af47dc..71da961dac 100644 --- a/keyboards/keychron/v2/ansi_encoder/keymaps/default/keymap.c +++ b/keyboards/keychron/v2/ansi_encoder/keymaps/default/keymap.c @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, [_FN1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI)}, diff --git a/keyboards/keychron/v2/ansi_encoder/keymaps/keychron/keymap.c b/keyboards/keychron/v2/ansi_encoder/keymaps/keychron/keymap.c index 00e7940fd9..5aa3a1fecc 100644 --- a/keyboards/keychron/v2/ansi_encoder/keymaps/keychron/keymap.c +++ b/keyboards/keychron/v2/ansi_encoder/keymaps/keychron/keymap.c @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on #if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, [_FN1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI)}, diff --git a/keyboards/keychron/v2/ansi_encoder/keymaps/via/keymap.c b/keyboards/keychron/v2/ansi_encoder/keymaps/via/keymap.c index 0385af47dc..71da961dac 100644 --- a/keyboards/keychron/v2/ansi_encoder/keymaps/via/keymap.c +++ b/keyboards/keychron/v2/ansi_encoder/keymaps/via/keymap.c @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #if defined(ENCODER_MAP_ENABLE) -const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { [MAC_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, [WIN_BASE] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU)}, [_FN1] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI)}, diff --git a/keyboards/keychron/v2/ansi_encoder/rules.mk b/keyboards/keychron/v2/ansi_encoder/rules.mk index 5240004b8c..6a772965ff 100644 --- a/keyboards/keychron/v2/ansi_encoder/rules.mk +++ b/keyboards/keychron/v2/ansi_encoder/rules.mk @@ -13,7 +13,6 @@ AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes # Enable Encoder DIP_SWITCH_ENABLE = yes RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = CKLED2001 EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = embedded_flash diff --git a/keyboards/keychron/v2/config.h b/keyboards/keychron/v2/config.h index 4cb2721911..08cc5b8e84 100644 --- a/keyboards/keychron/v2/config.h +++ b/keyboards/keychron/v2/config.h @@ -16,15 +16,6 @@ #pragma once -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* key matrix pins */ -#define MATRIX_ROW_PINS \ - { B4, B3, A15, A14, A13 } -#define MATRIX_COL_PINS \ - { C14, C15, A0, A1, A2, A3, A4, A5, A6, A7, B0, B1, A8, A9, H3 } - /* If uses PH3 with a stronger pull resistor then the following definition should be included */ // #define MATRIX_UNSELECT_DRIVE_HIGH diff --git a/keyboards/keychron/v2/iso/info.json b/keyboards/keychron/v2/iso/info.json index 0679e1737c..45ba9503e4 100644 --- a/keyboards/keychron/v2/iso/info.json +++ b/keyboards/keychron/v2/iso/info.json @@ -8,83 +8,91 @@ "pid": "0x0322", "device_version": "1.0.0" }, + "rgb_matrix": { + "driver": "CKLED2001" + }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "processor": "STM32L432", "bootloader": "stm32-dfu", "layouts": { "LAYOUT_iso_68": { "layout": [ - {"matrix":[0, 0], "x":0, "y":0.25}, - {"matrix":[0, 1], "x":1, "y":0.25}, - {"matrix":[0, 2], "x":2, "y":0.25}, - {"matrix":[0, 3], "x":3, "y":0.25}, - {"matrix":[0, 4], "x":4, "y":0.25}, - {"matrix":[0, 5], "x":5, "y":0.25}, - {"matrix":[0, 6], "x":6, "y":0.25}, - {"matrix":[0, 7], "x":7, "y":0.25}, - {"matrix":[0, 8], "x":8, "y":0.25}, - {"matrix":[0, 9], "x":9, "y":0.25}, - {"matrix":[0,10], "x":10, "y":0.25}, - {"matrix":[0,11], "x":11, "y":0.25}, - {"matrix":[0,12], "x":12, "y":0.25}, - {"matrix":[0,13], "x":13, "y":0.25, "w":2}, - {"matrix":[0,14], "x":15.25, "y":0}, + {"matrix": [0, 0], "x": 0, "y": 0.25}, + {"matrix": [0, 1], "x": 1, "y": 0.25}, + {"matrix": [0, 2], "x": 2, "y": 0.25}, + {"matrix": [0, 3], "x": 3, "y": 0.25}, + {"matrix": [0, 4], "x": 4, "y": 0.25}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [0, 6], "x": 6, "y": 0.25}, + {"matrix": [0, 7], "x": 7, "y": 0.25}, + {"matrix": [0, 8], "x": 8, "y": 0.25}, + {"matrix": [0, 9], "x": 9, "y": 0.25}, + {"matrix": [0, 10], "x": 10, "y": 0.25}, + {"matrix": [0, 11], "x": 11, "y": 0.25}, + {"matrix": [0, 12], "x": 12, "y": 0.25}, + {"matrix": [0, 13], "x": 13, "y": 0.25, "w": 2}, + {"matrix": [0, 14], "x": 15.25, "y": 0}, - {"matrix":[1, 0], "x":0, "y":1.25, "w":1.5}, - {"matrix":[1, 1], "x":1.5, "y":1.25}, - {"matrix":[1, 2], "x":2.5, "y":1.25}, - {"matrix":[1, 3], "x":3.5, "y":1.25}, - {"matrix":[1, 4], "x":4.5, "y":1.25}, - {"matrix":[1, 5], "x":5.5, "y":1.25}, - {"matrix":[1, 6], "x":6.5, "y":1.25}, - {"matrix":[1, 7], "x":7.5, "y":1.25}, - {"matrix":[1, 8], "x":8.5, "y":1.25}, - {"matrix":[1, 9], "x":9.5, "y":1.25}, - {"matrix":[1,10], "x":10.5, "y":1.25}, - {"matrix":[1,11], "x":11.5, "y":1.25}, - {"matrix":[1,12], "x":12.5, "y":1.25}, - {"matrix":[1,14], "x":15.25, "y":1.25}, + {"matrix": [1, 0], "x": 0, "y": 1.25, "w": 1.5}, + {"matrix": [1, 1], "x": 1.5, "y": 1.25}, + {"matrix": [1, 2], "x": 2.5, "y": 1.25}, + {"matrix": [1, 3], "x": 3.5, "y": 1.25}, + {"matrix": [1, 4], "x": 4.5, "y": 1.25}, + {"matrix": [1, 5], "x": 5.5, "y": 1.25}, + {"matrix": [1, 6], "x": 6.5, "y": 1.25}, + {"matrix": [1, 7], "x": 7.5, "y": 1.25}, + {"matrix": [1, 8], "x": 8.5, "y": 1.25}, + {"matrix": [1, 9], "x": 9.5, "y": 1.25}, + {"matrix": [1, 10], "x": 10.5, "y": 1.25}, + {"matrix": [1, 11], "x": 11.5, "y": 1.25}, + {"matrix": [1, 12], "x": 12.5, "y": 1.25}, + {"matrix": [1, 14], "x": 15.25, "y": 1.25}, - {"matrix":[2, 0], "x":0, "y":2.25, "w":1.75}, - {"matrix":[2, 1], "x":1.75, "y":2.25}, - {"matrix":[2, 2], "x":2.75, "y":2.25}, - {"matrix":[2, 3], "x":3.75, "y":2.25}, - {"matrix":[2, 4], "x":4.75, "y":2.25}, - {"matrix":[2, 5], "x":5.75, "y":2.25}, - {"matrix":[2, 6], "x":6.75, "y":2.25}, - {"matrix":[2, 7], "x":7.75, "y":2.25}, - {"matrix":[2, 8], "x":8.75, "y":2.25}, - {"matrix":[2, 9], "x":9.75, "y":2.25}, - {"matrix":[2,10], "x":10.75, "y":2.25}, - {"matrix":[2,11], "x":11.75, "y":2.25}, - {"matrix":[2,13], "x":12.75, "y":2.25}, - {"matrix":[1,13], "x":13.75, "y":1.25, "w":1.25, "h":2}, - {"matrix":[2,14], "x":15.25, "y":2.25}, + {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.75}, + {"matrix": [2, 1], "x": 1.75, "y": 2.25}, + {"matrix": [2, 2], "x": 2.75, "y": 2.25}, + {"matrix": [2, 3], "x": 3.75, "y": 2.25}, + {"matrix": [2, 4], "x": 4.75, "y": 2.25}, + {"matrix": [2, 5], "x": 5.75, "y": 2.25}, + {"matrix": [2, 6], "x": 6.75, "y": 2.25}, + {"matrix": [2, 7], "x": 7.75, "y": 2.25}, + {"matrix": [2, 8], "x": 8.75, "y": 2.25}, + {"matrix": [2, 9], "x": 9.75, "y": 2.25}, + {"matrix": [2, 10], "x": 10.75, "y": 2.25}, + {"matrix": [2, 11], "x": 11.75, "y": 2.25}, + {"matrix": [2, 13], "x": 12.75, "y": 2.25}, + {"matrix": [1, 13], "x": 13.75, "y": 1.25, "w": 1.25, "h": 2}, + {"matrix": [2, 14], "x": 15.25, "y": 2.25}, - {"matrix":[3, 0], "x":0, "y":3.25, "w":1.25}, - {"matrix":[3, 1], "x":1.25, "y":3.25}, - {"matrix":[3, 2], "x":2.25, "y":3.25}, - {"matrix":[3, 3], "x":3.25, "y":3.25}, - {"matrix":[3, 4], "x":4.25, "y":3.25}, - {"matrix":[3, 5], "x":5.25, "y":3.25}, - {"matrix":[3, 6], "x":6.25, "y":3.25}, - {"matrix":[3, 7], "x":7.25, "y":3.25}, - {"matrix":[3, 8], "x":8.25, "y":3.25}, - {"matrix":[3, 9], "x":9.25, "y":3.25}, - {"matrix":[3,10], "x":10.25, "y":3.25}, - {"matrix":[3,11], "x":11.25, "y":3.25}, - {"matrix":[3,13], "x":12.25, "y":3.25, "w":1.75}, - {"matrix":[3,14], "x":14.25, "y":3.5}, + {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.25}, + {"matrix": [3, 1], "x": 1.25, "y": 3.25}, + {"matrix": [3, 2], "x": 2.25, "y": 3.25}, + {"matrix": [3, 3], "x": 3.25, "y": 3.25}, + {"matrix": [3, 4], "x": 4.25, "y": 3.25}, + {"matrix": [3, 5], "x": 5.25, "y": 3.25}, + {"matrix": [3, 6], "x": 6.25, "y": 3.25}, + {"matrix": [3, 7], "x": 7.25, "y": 3.25}, + {"matrix": [3, 8], "x": 8.25, "y": 3.25}, + {"matrix": [3, 9], "x": 9.25, "y": 3.25}, + {"matrix": [3, 10], "x": 10.25, "y": 3.25}, + {"matrix": [3, 11], "x": 11.25, "y": 3.25}, + {"matrix": [3, 13], "x": 12.25, "y": 3.25, "w": 1.75}, + {"matrix": [3, 14], "x": 14.25, "y": 3.5}, - {"matrix":[4, 0], "x":0, "y":4.25, "w":1.25}, - {"matrix":[4, 1], "x":1.25, "y":4.25, "w":1.25}, - {"matrix":[4, 2], "x":2.5, "y":4.25, "w":1.25}, - {"matrix":[4, 6], "x":3.75, "y":4.25, "w":6.25}, - {"matrix":[4,10], "x":10, "y":4.25}, - {"matrix":[4,11], "x":11, "y":4.25}, - {"matrix":[4,12], "x":12, "y":4.25}, - {"matrix":[4,13], "x":13.25, "y":4.5}, - {"matrix":[2,12], "x":14.25, "y":4.5}, - {"matrix":[4,14], "x":15.25, "y":4.5} + {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25}, + {"matrix": [4, 1], "x": 1.25, "y": 4.25, "w": 1.25}, + {"matrix": [4, 2], "x": 2.5, "y": 4.25, "w": 1.25}, + {"matrix": [4, 6], "x": 3.75, "y": 4.25, "w": 6.25}, + {"matrix": [4, 10], "x": 10, "y": 4.25}, + {"matrix": [4, 11], "x": 11, "y": 4.25}, + {"matrix": [4, 12], "x": 12, "y": 4.25}, + {"matrix": [4, 13], "x": 13.25, "y": 4.5}, + {"matrix": [2, 12], "x": 14.25, "y": 4.5}, + {"matrix": [4, 14], "x": 15.25, "y": 4.5} ] } } diff --git a/keyboards/keychron/v2/iso/rules.mk b/keyboards/keychron/v2/iso/rules.mk index 345807d824..2b4a67b1ee 100644 --- a/keyboards/keychron/v2/iso/rules.mk +++ b/keyboards/keychron/v2/iso/rules.mk @@ -12,7 +12,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output DIP_SWITCH_ENABLE = yes RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = CKLED2001 EEPROM_DRIVER = wear_leveling WEAR_LEVELING_DRIVER = embedded_flash diff --git a/keyboards/keychron/v2/iso_encoder/info.json b/keyboards/keychron/v2/iso_encoder/info.json index a784b33ec5..d517e341df 100644 --- a/keyboards/keychron/v2/iso_encoder/info.json +++ b/keyboards/keychron/v2/iso_encoder/info.json @@ -1,4 +1,5 @@ -{ "keyboard_name": "Keychron V2", +{ + "keyboard_name": "Keychron V2", "manufacturer": "Keychron", "url": "https://github.com/Keychron", "maintainer": "lalalademaxiya1", @@ -7,6 +8,14 @@ "pid": "0x0323", "device_version": "1.0.0" }, + "rgb_matrix": { + "driver": "CKLED2001" + }, + "matrix_pins": { + "cols": ["C14", "C15", "A0", "A1", "A2", "A3", "A4", "A5", "A6", "A7", "B0", "B1", "A8", "A9", "H3"], + "rows": ["B4", "B3", "A15", "A14", "A13"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "A10", "pin_b": "B5"} @@ -17,78 +26,78 @@ "layouts": { "LAYOUT_iso_68": { "layout": [ - {"matrix":[0, 0], "x":0, "y":0.25}, - {"matrix":[0, 1], "x":1, "y":0.25}, - {"matrix":[0, 2], "x":2, "y":0.25}, - {"matrix":[0, 3], "x":3, "y":0.25}, - {"matrix":[0, 4], "x":4, "y":0.25}, - {"matrix":[0, 5], "x":5, "y":0.25}, - {"matrix":[0, 6], "x":6, "y":0.25}, - {"matrix":[0, 7], "x":7, "y":0.25}, - {"matrix":[0, 8], "x":8, "y":0.25}, - {"matrix":[0, 9], "x":9, "y":0.25}, - {"matrix":[0,10], "x":10, "y":0.25}, - {"matrix":[0,11], "x":11, "y":0.25}, - {"matrix":[0,12], "x":12, "y":0.25}, - {"matrix":[0,13], "x":13, "y":0.25, "w":2}, - {"matrix":[0,14], "x":15.25, "y":0}, + {"matrix": [0, 0], "x": 0, "y": 0.25}, + {"matrix": [0, 1], "x": 1, "y": 0.25}, + {"matrix": [0, 2], "x": 2, "y": 0.25}, + {"matrix": [0, 3], "x": 3, "y": 0.25}, + {"matrix": [0, 4], "x": 4, "y": 0.25}, + {"matrix": [0, 5], "x": 5, "y": 0.25}, + {"matrix": [0, 6], "x": 6, "y": 0.25}, + {"matrix": [0, 7], "x": 7, "y": 0.25}, + {"matrix": [0, 8], "x": 8, "y": 0.25}, + {"matrix": [0, 9], "x": 9, "y": 0.25}, + {"matrix": [0, 10], "x": 10, "y": 0.25}, + {"matrix": [0, 11], "x": 11, "y": 0.25}, + {"matrix": [0, 12], "x": 12, "y": 0.25}, + {"matrix": [0, 13], "x": 13, "y": 0.25, "w": 2}, + {"matrix": [0, 14], "x": 15.25, "y": 0}, - {"matrix":[1, 0], "x":0, "y":1.25, "w":1.5}, - {"matrix":[1, 1], "x":1 |