diff options
author | adophoxia <100170946+adophoxia@users.noreply.github.com> | 2023-10-03 20:52:09 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-03 20:52:09 -0700 |
commit | 75ba2db2c19f20434f842108acefddc9ca5ebde1 (patch) | |
tree | 29da2810e47a8f295e57b120f1dacf696b068a09 /keyboards/keychron/q2/ansi | |
parent | 177fee0ad4ac2e8530f70991ead98dbd4aebff26 (diff) |
Update Keychron Q2 (#21994)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'keyboards/keychron/q2/ansi')
-rw-r--r-- | keyboards/keychron/q2/ansi/ansi.c | 29 | ||||
-rw-r--r-- | keyboards/keychron/q2/ansi/config.h | 7 | ||||
-rw-r--r-- | keyboards/keychron/q2/ansi/info.json | 87 | ||||
-rw-r--r-- | keyboards/keychron/q2/ansi/rules.mk | 16 |
4 files changed, 79 insertions, 60 deletions
diff --git a/keyboards/keychron/q2/ansi/ansi.c b/keyboards/keychron/q2/ansi/ansi.c index 28f91269c4..baf12d3df0 100644 --- a/keyboards/keychron/q2/ansi/ansi.c +++ b/keyboards/keychron/q2/ansi/ansi.c @@ -97,33 +97,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { {1, F_16, D_16, E_16}, }; -#define __ NO_LED - -led_config_t g_led_config = { - { - // Key Matrix to LED Index - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, - { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 65, 42, 43 }, - { 44, __, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, __, 55, 56 }, - { 57, 58, 59, __, __, __, 60, __, __, __, 61, 62, 63, 64, 66 } - }, - { - // LED Index to Physical Position - {0,0}, {15,0}, {29,0}, {44,0}, {59,0}, {73,0}, {88,0}, {103,0}, {118,0}, {132,0}, {147,0}, {162,0}, {176,0}, {198,0}, {224,0}, - {4,15}, {22,15}, {37,15}, {51,15}, {66,15}, {81,15}, {95,15}, {110,15}, {125,15}, {140,15}, {154,15}, {169,15}, {184,15}, {202,15}, {224,15}, - {6,30}, {26,30}, {40,30}, {55,30}, {70,30}, {84,30}, {99,30}, {114,30}, {129,30}, {143,30}, {158,30}, {173,30}, {196,30}, {224,30}, - {9,45}, {33,45}, {48,45}, {62,45}, {77,45}, {92,45}, {106,45}, {121,45}, {136,45}, {151,45}, {165,45}, {185,45}, {209,49}, - {2,60}, {20,60}, {39,60}, {94,60}, {147,60}, {162,60}, {176,60}, {195,64}, {209,64}, {224,64} - }, - { - // RGB LED Index to Flag - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q2/ansi/config.h b/keyboards/keychron/q2/ansi/config.h index 6c39432b74..41b92074be 100644 --- a/keyboards/keychron/q2/ansi/config.h +++ b/keyboards/keychron/q2/ansi/config.h @@ -17,6 +17,7 @@ #pragma once /* RGB Matrix Configuration */ -#define DRIVER_1_LED_TOTAL 34 -#define DRIVER_2_LED_TOTAL 33 -#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT 67 + +/* Enable caps-lock LED */ +#define CAPS_LOCK_LED_INDEX 30
\ No newline at end of file diff --git a/keyboards/keychron/q2/ansi/info.json b/keyboards/keychron/q2/ansi/info.json index 8ed601fe8f..d419d31eef 100644 --- a/keyboards/keychron/q2/ansi/info.json +++ b/keyboards/keychron/q2/ansi/info.json @@ -1,23 +1,84 @@ { - "keyboard_name": "Q2", - "manufacturer": "Keychron", - "url": "https://github.com/Keychron", - "maintainer": "lalalademaxiya1", "usb": { - "vid": "0x3434", "pid": "0x0110", "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"] + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 1], "x": 15, "y": 0, "flags": 4}, + {"matrix": [0, 2], "x": 29, "y": 0, "flags": 4}, + {"matrix": [0, 3], "x": 44, "y": 0, "flags": 4}, + {"matrix": [0, 4], "x": 59, "y": 0, "flags": 4}, + {"matrix": [0, 5], "x": 73, "y": 0, "flags": 4}, + {"matrix": [0, 6], "x": 88, "y": 0, "flags": 4}, + {"matrix": [0, 7], "x": 103, "y": 0, "flags": 4}, + {"matrix": [0, 8], "x": 118, "y": 0, "flags": 4}, + {"matrix": [0, 9], "x": 132, "y": 0, "flags": 4}, + {"matrix": [0, 10], "x": 147, "y": 0, "flags": 4}, + {"matrix": [0, 11], "x": 162, "y": 0, "flags": 4}, + {"matrix": [0, 12], "x": 176, "y": 0, "flags": 4}, + {"matrix": [0, 13], "x": 198, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 224, "y": 0, "flags": 1}, + + {"matrix": [1, 0], "x": 4, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 22, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 37, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 51, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 66, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 81, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 95, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 110, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 125, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 140, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 154, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 169, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 184, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 202, "y": 15, "flags": 1}, + {"matrix": [1, 14], "x": 224, "y": 15, "flags": 1}, + + {"matrix": [2, 0], "x": 6, "y": 30, "flags": 1}, + {"matrix": [2, 1], "x": 26, "y": 30, "flags": 4}, + {"matrix": [2, 2], "x": 40, "y": 30, "flags": 4}, + {"matrix": [2, 3], "x": 55, "y": 30, "flags": 4}, + {"matrix": [2, 4], "x": 70, "y": 30, "flags": 4}, + {"matrix": [2, 5], "x": 84, "y": 30, "flags": 4}, + {"matrix": [2, 6], "x": 99, "y": 30, "flags": 4}, + {"matrix": [2, 7], "x": 114, "y": 30, "flags": 4}, + {"matrix": [2, 8], "x": 129, "y": 30, "flags": 4}, + {"matrix": [2, 9], "x": 143, "y": 30, "flags": 4}, + {"matrix": [2, 10], "x": 158, "y": 30, "flags": 4}, + {"matrix": [2, 11], "x": 173, "y": 30, "flags": 4}, + {"matrix": [2, 13], "x": 196, "y": 30, "flags": 1}, + {"matrix": [2, 14], "x": 224, "y": 30, "flags": 1}, + + {"matrix": [3, 0], "x": 9, "y": 45, "flags": 1}, + {"matrix": [3, 2], "x": 33, "y": 45, "flags": 4}, + {"matrix": [3, 3], "x": 48, "y": 45, "flags": 4}, + {"matrix": [3, 4], "x": 62, "y": 45, "flags": 4}, + {"matrix": [3, 5], "x": 77, "y": 45, "flags": 4}, + {"matrix": [3, 6], "x": 92, "y": 45, "flags": 4}, + {"matrix": [3, 7], "x": 106, "y": 45, "flags": 4}, + {"matrix": [3, 8], "x": 121, "y": 45, "flags": 4}, + {"matrix": [3, 9], "x": 136, "y": 45, "flags": 4}, + {"matrix": [3, 10], "x": 151, "y": 45, "flags": 4}, + {"matrix": [3, 11], "x": 165, "y": 45, "flags": 4}, + {"matrix": [3, 13], "x": 185, "y": 45, "flags": 1}, + {"matrix": [3, 14], "x": 209, "y": 49, "flags": 1}, + + {"matrix": [4, 0], "x": 2, "y": 60, "flags": 1}, + {"matrix": [4, 1], "x": 20, "y": 60, "flags": 1}, + {"matrix": [4, 2], "x": 39, "y": 60, "flags": 1}, + {"matrix": [4, 6], "x": 94, "y": 60, "flags": 4}, + {"matrix": [4, 10], "x": 147, "y": 60, "flags": 1}, + {"matrix": [4, 11], "x": 162, "y": 60, "flags": 1}, + {"matrix": [4, 12], "x": 176, "y": 60, "flags": 1}, + {"matrix": [4, 13], "x": 195, "y": 64, "flags": 1}, + {"matrix": [2, 12], "x": 209, "y": 64, "flags": 1}, + {"matrix": [4, 14], "x": 224, "y": 64, "flags": 1} + + ] }, - "diode_direction": "ROW2COL", - "processor": "STM32L432", - "bootloader": "stm32-dfu", "layouts": { "LAYOUT_ansi_67": { "layout": [ diff --git a/keyboards/keychron/q2/ansi/rules.mk b/keyboards/keychron/q2/ansi/rules.mk index eca21676ee..7ff128fa69 100644 --- a/keyboards/keychron/q2/ansi/rules.mk +++ b/keyboards/keychron/q2/ansi/rules.mk @@ -1,15 +1 @@ -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = yes # Enable N-Key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = no # Enable Encoder -DIP_SWITCH_ENABLE = yes -RGB_MATRIX_ENABLE = yes +# This file intentionally left blank
\ No newline at end of file |