diff options
Diffstat (limited to 'keyboards/keychron/q5/iso_encoder')
-rw-r--r-- | keyboards/keychron/q5/iso_encoder/config.h | 10 | ||||
-rw-r--r-- | keyboards/keychron/q5/iso_encoder/info.json | 129 | ||||
-rw-r--r-- | keyboards/keychron/q5/iso_encoder/iso_encoder.c | 34 | ||||
-rw-r--r-- | keyboards/keychron/q5/iso_encoder/rules.mk | 18 |
4 files changed, 112 insertions, 79 deletions
diff --git a/keyboards/keychron/q5/iso_encoder/config.h b/keyboards/keychron/q5/iso_encoder/config.h index 3a786cbb39..9611480fad 100644 --- a/keyboards/keychron/q5/iso_encoder/config.h +++ b/keyboards/keychron/q5/iso_encoder/config.h @@ -16,16 +16,8 @@ #pragma once -/* RGB Matrix Configuration */ -#define DRIVER_1_LED_TOTAL 53 -#define DRIVER_2_LED_TOTAL 46 -#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) - -/* Encoder Configuration */ -#define ENCODER_DEFAULT_POS 0x3 - /* Enable caps-lock LED */ #define CAPS_LOCK_LED_INDEX 51 /* Enable num-lock LED */ -// #define NUM_LOCK_LED_INDEX 31 +#define NUM_LOCK_LED_INDEX 31 diff --git a/keyboards/keychron/q5/iso_encoder/info.json b/keyboards/keychron/q5/iso_encoder/info.json index a425cf3145..10e6767eaf 100644 --- a/keyboards/keychron/q5/iso_encoder/info.json +++ b/keyboards/keychron/q5/iso_encoder/info.json @@ -1,23 +1,117 @@ { - "keyboard_name": "Keychron Q5", - "manufacturer": "Keychron", - "url": "https://github.com/Keychron", - "maintainer": "lalalademaxiya1", - "usb": { - "vid": "0x3434", - "pid": "0x0153", - "device_version": "1.0.0" - }, - "rgb_matrix": { - "driver": "snled27351" - }, "encoder": { + "enabled": true, "rotary": [ {"pin_a": "C14", "pin_b": "A2"} ] }, - "processor": "STM32L432", - "bootloader": "stm32-dfu", + "rgb_matrix": { + "layout": [ + {"matrix": [0, 0], "x": 0, "y": 0, "flags": 1}, + {"matrix": [0, 2], "x": 24, "y": 0, "flags": 1}, + {"matrix": [0, 3], "x": 36, "y": 0, "flags": 1}, + {"matrix": [0, 4], "x": 48, "y": 0, "flags": 1}, + {"matrix": [0, 5], "x": 60, "y": 0, "flags": 1}, + {"matrix": [0, 7], "x": 78, "y": 0, "flags": 1}, + {"matrix": [0, 8], "x": 90, "y": 0, "flags": 1}, + {"matrix": [0, 9], "x": 103, "y": 0, "flags": 1}, + {"matrix": [0, 10], "x": 115, "y": 0, "flags": 1}, + {"matrix": [0, 11], "x": 133, "y": 0, "flags": 1}, + {"matrix": [0, 12], "x": 145, "y": 0, "flags": 1}, + {"matrix": [0, 13], "x": 157, "y": 0, "flags": 1}, + {"matrix": [0, 14], "x": 169, "y": 0, "flags": 1}, + {"matrix": [0, 15], "x": 184, "y": 0, "flags": 1}, + {"matrix": [0, 16], "x": 196, "y": 0, "flags": 1}, + {"matrix": [0, 17], "x": 208, "y": 0, "flags": 1}, + {"matrix": [3, 12], "x": 224, "y": 0, "flags": 1}, + {"matrix": [1, 0], "x": 0, "y": 15, "flags": 1}, + {"matrix": [1, 1], "x": 12, "y": 15, "flags": 4}, + {"matrix": [1, 2], "x": 24, "y": 15, "flags": 4}, + {"matrix": [1, 3], "x": 36, "y": 15, "flags": 4}, + {"matrix": [1, 4], "x": 48, "y": 15, "flags": 4}, + {"matrix": [1, 5], "x": 60, "y": 15, "flags": 4}, + {"matrix": [1, 6], "x": 72, "y": 15, "flags": 4}, + {"matrix": [1, 7], "x": 85, "y": 15, "flags": 4}, + {"matrix": [1, 8], "x": 97, "y": 15, "flags": 4}, + {"matrix": [1, 9], "x": 109, "y": 15, "flags": 4}, + {"matrix": [1, 10], "x": 121, "y": 15, "flags": 4}, + {"matrix": [1, 11], "x": 133, "y": 15, "flags": 4}, + {"matrix": [1, 12], "x": 145, "y": 15, "flags": 4}, + {"matrix": [1, 13], "x": 163, "y": 15, "flags": 1}, + {"matrix": [1, 15], "x": 188, "y": 15, "flags": 8}, + {"matrix": [1, 16], "x": 200, "y": 15, "flags": 4}, + {"matrix": [1, 17], "x": 212, "y": 15, "flags": 4}, + {"matrix": [3, 14], "x": 224, "y": 15, "flags": 4}, + {"matrix": [2, 0], "x": 3, "y": 26, "flags": 1}, + {"matrix": [2, 1], "x": 18, "y": 26, "flags": 4}, + {"matrix": [2, 2], "x": 30, "y": 26, "flags": 4}, + {"matrix": [2, 3], "x": 42, "y": 26, "flags": 4}, + {"matrix": [2, 4], "x": 54, "y": 26, "flags": 4}, + {"matrix": [2, 5], "x": 66, "y": 26, "flags": 4}, + {"matrix": [2, 6], "x": 78, "y": 26, "flags": 4}, + {"matrix": [2, 7], "x": 91, "y": 26, "flags": 4}, + {"matrix": [2, 8], "x": 103, "y": 26, "flags": 4}, + {"matrix": [2, 9], "x": 115, "y": 26, "flags": 4}, + {"matrix": [2, 10], "x": 127, "y": 26, "flags": 4}, + {"matrix": [2, 11], "x": 139, "y": 26, "flags": 4}, + {"matrix": [2, 12], "x": 151, "y": 26, "flags": 4}, + {"matrix": [2, 15], "x": 188, "y": 26, "flags": 4}, + {"matrix": [2, 16], "x": 200, "y": 26, "flags": 4}, + {"matrix": [2, 17], "x": 212, "y": 26, "flags": 4}, + {"matrix": [3, 0], "x": 5, "y": 38, "flags": 8}, + {"matrix": [3, 1], "x": 21, "y": 38, "flags": 4}, + {"matrix": [3, 2], "x": 33, "y": 38, "flags": 4}, + {"matrix": [3, 3], "x": 45, "y": 38, "flags": 4}, + {"matrix": [3, 4], "x": 57, "y": 38, "flags": 4}, + {"matrix": [3, 5], "x": 69, "y": 38, "flags": 4}, + {"matrix": [3, 6], "x": 81, "y": 38, "flags": 4}, + {"matrix": [3, 7], "x": 94, "y": 38, "flags": 4}, + {"matrix": [3, 8], "x": 106, "y": 38, "flags": 4}, + {"matrix": [3, 9], "x": 118, "y": 38, "flags": 4}, + {"matrix": [3, 10], "x": 130, "y": 38, "flags": 4}, + {"matrix": [3, 11], "x": 142, "y": 38, "flags": 4}, + {"matrix": [3, 13], "x": 154, "y": 38, "flags": 4}, + {"matrix": [2, 13], "x": 170, "y": 34, "flags": 1}, + {"matrix": [3, 15], "x": 188, "y": 38, "flags": 4}, + {"matrix": [3, 16], "x": 200, "y": 38, "flags": 4}, + {"matrix": [3, 17], "x": 212, "y": 38, "flags": 4}, + {"matrix": [2, 14], "x": 224, "y": 32, "flags": 4}, + {"matrix": [4, 0], "x": 3, "y": 49, "flags": 1}, + {"matrix": [4, 1], "x": 15, "y": 49, "flags": 4}, + {"matrix": [4, 2], "x": 27, "y": 49, "flags": 4}, + {"matrix": [4, 3], "x": 39, "y": 49, "flags": 4}, + {"matrix": [4, 4], "x": 51, "y": 49, "flags": 4}, + {"matrix": [4, 5], "x": 63, "y": 49, "flags": 4}, + {"matrix": [4, 6], "x": 75, "y": 49, "flags": 4}, + {"matrix": [4, 7], "x": 88, "y": 49, "flags": 4}, + {"matrix": [4, 8], "x": 100, "y": 49, "flags": 4}, + {"matrix": [4, 9], "x": 112, "y": 49, "flags": 4}, + {"matrix": [4, 10], "x": 124, "y": 49, "flags": 4}, + {"matrix": [4, 11], "x": 136, "y": 49, "flags": 4}, + {"matrix": [4, 13], "x": 152, "y": 49, "flags": 1}, + {"matrix": [4, 14], "x": 172, "y": 52, "flags": 1}, + {"matrix": [4, 15], "x": 188, "y": 49, "flags": 4}, + {"matrix": [4, 16], "x": 200, "y": 49, "flags": 4}, + {"matrix": [4, 17], "x": 212, "y": 49, "flags": 4}, + {"matrix": [5, 0], "x": 1, "y": 61, "flags": 1}, + {"matrix": [5, 1], "x": 17, "y": 61, "flags": 1}, + {"matrix": [5, 2], "x": 32, "y": 61, "flags": 1}, + {"matrix": [5, 6], "x": 77, "y": 61, "flags": 4}, + {"matrix": [5, 10], "x": 121, "y": 61, "flags": 1}, + {"matrix": [5, 11], "x": 133, "y": 61, "flags": 1}, + {"matrix": [5, 12], "x": 145, "y": 61, "flags": 1}, + {"matrix": [5, 13], "x": 160, "y": 64, "flags": 1}, + {"matrix": [5, 14], "x": 172, "y": 64, "flags": 1}, + {"matrix": [5, 15], "x": 184, "y": 64, "flags": 1}, + {"matrix": [5, 16], "x": 200, "y": 61, "flags": 4}, + {"matrix": [5, 17], "x": 212, "y": 61, "flags": 4}, + {"matrix": [5, 5], "x": 224, "y": 55, "flags": 1} + ] + }, + "usb": { + "device_version": "1.0.0", + "pid": "0x0153" + }, "layouts": { "LAYOUT_iso_99": { "layout": [ @@ -38,7 +132,6 @@ {"matrix": [0, 16], "x": 16.25, "y": 0}, {"matrix": [0, 17], "x": 17.25, "y": 0}, {"matrix": [3, 12], "x": 18.5, "y": 0}, - {"matrix": [1, 0], "x": 0, "y": 1.25}, {"matrix": [1, 1], "x": 1, "y": 1.25}, {"matrix": [1, 2], "x": 2, "y": 1.25}, @@ -57,7 +150,6 @@ {"matrix": [1, 16], "x": 16.5, "y": 1.25}, {"matrix": [1, 17], "x": 17.5, "y": 1.25}, {"matrix": [3, 14], "x": 18.5, "y": 1.25}, - {"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5}, {"matrix": [2, 1], "x": 1.5, "y": 2.25}, {"matrix": [2, 2], "x": 2.5, "y": 2.25}, @@ -74,7 +166,6 @@ {"matrix": [2, 15], "x": 15.5, "y": 2.25}, {"matrix": [2, 16], "x": 16.5, "y": 2.25}, {"matrix": [2, 17], "x": 17.5, "y": 2.25}, - {"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75}, {"matrix": [3, 1], "x": 1.75, "y": 3.25}, {"matrix": [3, 2], "x": 2.75, "y": 3.25}, @@ -93,7 +184,6 @@ {"matrix": [3, 16], "x": 16.5, "y": 3.25}, {"matrix": [3, 17], "x": 17.5, "y": 3.25}, {"matrix": [2, 14], "x": 18.5, "y": 2.25, "h": 2}, - {"matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25}, {"matrix": [4, 1], "x": 1.25, "y": 4.25}, {"matrix": [4, 2], "x": 2.25, "y": 4.25}, @@ -111,7 +201,6 @@ {"matrix": [4, 15], "x": 15.5, "y": 4.25}, {"matrix": [4, 16], "x": 16.5, "y": 4.25}, {"matrix": [4, 17], "x": 17.5, "y": 4.25}, - {"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25}, {"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, {"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, @@ -128,4 +217,4 @@ ] } } -} +}
\ No newline at end of file diff --git a/keyboards/keychron/q5/iso_encoder/iso_encoder.c b/keyboards/keychron/q5/iso_encoder/iso_encoder.c index 009e8043db..887931c054 100644 --- a/keyboards/keychron/q5/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q5/iso_encoder/iso_encoder.c @@ -20,7 +20,7 @@ // clang-format off -const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { +const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = { /* Refer to SNLED27351 manual for these locations * driver * | R location @@ -133,36 +133,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[RGB_MATRIX_LED_COUNT] = { {1, L_7, J_7, K_7} }; -#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 }, - { 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, __, 31, 32, 33 }, - { 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 64, 68, 48, 49, 50 }, - { 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 16, 63, 34, 65, 66, 67 }, - { 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, __, 81, 82, 83, 84, 85 }, - { 86, 87, 88, __, __, 98, 89, __, __, __, 90, 91, 92, 93, 94, 95, 96, 97 }, - }, - { - // LED Index to Physical Position - {0,0}, {24,0}, {36,0}, {48,0}, {60,0}, {78,0}, {90,0}, {103,0}, {115,0}, {133,0}, {145,0}, {157,0}, {169,0}, {184,0}, {196,0}, {208,0}, {224,0}, - {0,15}, {12,15}, {24,15}, {36,15}, {48,15}, {60,15}, {72,15}, {85,15}, {97,15}, {109,15}, {121,15}, {133,15}, {145,15}, {163,15}, {188,15}, {200,15}, {212,15}, {224,15}, - {3,26}, {18,26}, {30,26}, {42,26}, {54,26}, {66,26}, {78,26}, {91,26}, {103,26}, {115,26}, {127,26}, {139,26}, {151,26}, {188,26}, {200,26}, {212,26}, - {5,38}, {21,38}, {33,38}, {45,38}, {57,38}, {69,38}, {81,38}, {94,38}, {106,38}, {118,38}, {130,38}, {142,38}, {154,38}, {170,34}, {188,38}, {200,38}, {212,38}, {224,32}, - {3,49}, {15,49}, {27,49}, {39,49}, {51,49}, {63,49}, {75,49}, {88,49}, {100,49}, {112,49}, {124,49}, {136,49}, {152,49}, {172,52}, {188,49}, {200,49}, {212,49}, - {1,61}, {17,61}, {32,61}, {77,61}, {121,61}, {133,61}, {145,61}, {160,64}, {172,64}, {184,64}, {200,61}, {212,61}, {224,55}, - }, - { - // RGB LED Index to Flag - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 8, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 8, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 4, 4, 1, - } -}; - #endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q5/iso_encoder/rules.mk b/keyboards/keychron/q5/iso_encoder/rules.mk index 4c6e5bebf0..c0d1417299 100644 --- a/keyboards/keychron/q5/iso_encoder/rules.mk +++ b/keyboards/keychron/q5/iso_encoder/rules.mk @@ -1,20 +1,4 @@ -# 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 USB N-key Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -ENCODER_ENABLE = yes # Enable Encoder -DIP_SWITCH_ENABLE = yes -RGB_MATRIX_ENABLE = yes - # custom matrix setup CUSTOM_MATRIX = lite -SRC += matrix.c +SRC += matrix.c
\ No newline at end of file |