Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Q9 #22579

Merged
merged 7 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions keyboards/keychron/q9/ansi/ansi.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,30 +84,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
{0, C_4, A_4, B_4}
};

#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, 51, 27, 28 },
{ 29, __, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, __, 40, 41 },
{ 42, 43, 44, __, __, __, 45, __, __, __, 46, 47, 48, 49, 50 },
},
{
// LED Index to Physical Position
{2,0}, {20,0}, {35,0}, {50,0}, {65,0}, {80,0}, {94,0}, {109,0}, {124,0}, {139,0}, {154,0}, {168,0}, {183,0}, {202,0}, {224,0},
{4,21}, {24,21}, {39,21}, {54,21}, {68,21}, {83,21}, {98,21}, {113,21}, {128,21}, {142,21}, {157,21}, {172,21}, {196,21}, {224,27},
{7,43}, {31,43}, {46,43}, {61,43}, {76,43}, {91,43}, {105,43}, {120,43}, {135,43}, {150,43}, {165,43}, {185,43}, {205,43},
{0,64}, {18,64}, {37,64}, {92,64}, {146,64}, {161,64}, {176,64}, {190,64}, {205,64}, {220,64},
},
{
// RGB LED Index to Flag
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
8, 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
4 changes: 0 additions & 4 deletions keyboards/keychron/q9/ansi/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@

#pragma once

/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 52
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL

/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 15
79 changes: 61 additions & 18 deletions keyboards/keychron/q9/ansi/info.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,67 @@
{
"keyboard_name": "Keychron Q9",
"manufacturer": "Keychron",
"url": "https://github.com/Keychron",
"maintainer": "lalalademaxiya1",
"usb": {
"vid": "0x3434",
"pid": "0x0190",
"device_version": "1.0.0"
},
"rgb_matrix": {
"driver": "snled27351"
"layout": [
{"matrix": [0, 0], "x": 2, "y": 0, "flags": 1},
{"matrix": [0, 1], "x": 20, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 35, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 50, "y": 0, "flags": 4},
{"matrix": [0, 4], "x": 65, "y": 0, "flags": 4},
{"matrix": [0, 5], "x": 80, "y": 0, "flags": 4},
{"matrix": [0, 6], "x": 94, "y": 0, "flags": 4},
{"matrix": [0, 7], "x": 109, "y": 0, "flags": 4},
{"matrix": [0, 8], "x": 124, "y": 0, "flags": 4},
{"matrix": [0, 9], "x": 139, "y": 0, "flags": 4},
{"matrix": [0, 10], "x": 154, "y": 0, "flags": 4},
{"matrix": [0, 11], "x": 168, "y": 0, "flags": 4},
{"matrix": [0, 12], "x": 183, "y": 0, "flags": 4},
{"matrix": [0, 13], "x": 202, "y": 0, "flags": 4},
{"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},

{"matrix": [1, 0], "x": 4, "y": 21, "flags": 8},
{"matrix": [1, 1], "x": 24, "y": 21, "flags": 4},
{"matrix": [1, 2], "x": 39, "y": 21, "flags": 4},
{"matrix": [1, 3], "x": 54, "y": 21, "flags": 4},
{"matrix": [1, 4], "x": 68, "y": 21, "flags": 4},
{"matrix": [1, 5], "x": 83, "y": 21, "flags": 4},
{"matrix": [1, 6], "x": 98, "y": 21, "flags": 4},
{"matrix": [1, 7], "x": 113, "y": 21, "flags": 4},
{"matrix": [1, 8], "x": 128, "y": 21, "flags": 4},
{"matrix": [1, 9], "x": 142, "y": 21, "flags": 4},
{"matrix": [1, 10], "x": 157, "y": 21, "flags": 4},
{"matrix": [1, 11], "x": 172, "y": 21, "flags": 4},
{"matrix": [1, 13], "x": 196, "y": 21, "flags": 1},
{"matrix": [1, 14], "x": 224, "y": 27, "flags": 1},

{"matrix": [2, 0], "x": 7, "y": 43, "flags": 1},
{"matrix": [2, 2], "x": 31, "y": 43, "flags": 4},
{"matrix": [2, 3], "x": 46, "y": 43, "flags": 4},
{"matrix": [2, 4], "x": 61, "y": 43, "flags": 4},
{"matrix": [2, 5], "x": 76, "y": 43, "flags": 4},
{"matrix": [2, 6], "x": 91, "y": 43, "flags": 4},
{"matrix": [2, 7], "x": 105, "y": 43, "flags": 4},
{"matrix": [2, 8], "x": 120, "y": 43, "flags": 4},
{"matrix": [2, 9], "x": 135, "y": 43, "flags": 4},
{"matrix": [2, 10], "x": 150, "y": 43, "flags": 4},
{"matrix": [2, 11], "x": 165, "y": 43, "flags": 4},
{"matrix": [2, 13], "x": 185, "y": 43, "flags": 1},
{"matrix": [2, 14], "x": 205, "y": 43, "flags": 1},

{"matrix": [3, 0], "x": 0, "y": 64, "flags": 1},
{"matrix": [3, 1], "x": 18, "y": 64, "flags": 1},
{"matrix": [3, 2], "x": 37, "y": 64, "flags": 1},
{"matrix": [3, 6], "x": 92, "y": 64, "flags": 4},
{"matrix": [3, 10], "x": 146, "y": 64, "flags": 1},
{"matrix": [3, 11], "x": 161, "y": 64, "flags": 1},
{"matrix": [3, 12], "x": 176, "y": 64, "flags": 1},
{"matrix": [3, 13], "x": 190, "y": 64, "flags": 1},
{"matrix": [3, 14], "x": 205, "y": 64, "flags": 1},
{"matrix": [1, 12], "x": 220, "y": 64, "flags": 1}
]
},
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
"rows": ["B3", "A15", "A14", "A13"]
"usb": {
"device_version": "1.0.0",
"pid": "0x0190"
},
"diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"layouts": {
"LAYOUT_ansi_52": {
"layout": [
Expand Down Expand Up @@ -65,7 +109,6 @@
{"matrix": [2, 11], "x": 11.25, "y": 2.25},
{"matrix": [2, 13], "x": 12.25, "y": 2.25, "w": 1.75},
{"matrix": [2, 14], "x": 14.25, "y": 2.5},

{"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.25},
{"matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.25},
{"matrix": [3, 2], "x": 2.5, "y": 3.25, "w": 1.25},
Expand All @@ -79,4 +122,4 @@
]
}
}
}
}
15 changes: 1 addition & 14 deletions keyboards/keychron/q9/ansi/rules.mk
Original file line number Diff line number Diff line change
@@ -1,14 +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 USB N-key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
# This file intentionally left blank
26 changes: 0 additions & 26 deletions keyboards/keychron/q9/ansi_encoder/ansi_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,30 +84,4 @@ const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
{0, C_4, A_4, B_4}
};

#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, 51, 27, 28 },
{ 29, __, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, __, 40, 41 },
{ 42, 43, 44, __, __, __, 45, __, __, __, 46, 47, 48, 49, 50 },
},
{
// LED Index to Physical Position
{2,0}, {20,0}, {35,0}, {50,0}, {65,0}, {80,0}, {94,0}, {109,0}, {124,0}, {139,0}, {154,0}, {168,0}, {183,0}, {202,0}, {224,0},
{4,21}, {24,21}, {39,21}, {54,21}, {68,21}, {83,21}, {98,21}, {113,21}, {128,21}, {142,21}, {157,21}, {172,21}, {196,21}, {224,27},
{7,43}, {31,43}, {46,43}, {61,43}, {76,43}, {91,43}, {105,43}, {120,43}, {135,43}, {150,43}, {165,43}, {185,43}, {205,43},
{0,64}, {18,64}, {37,64}, {92,64}, {146,64}, {161,64}, {176,64}, {190,64}, {205,64}, {220,64},
},
{
// RGB LED Index to Flag
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
8, 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, 1, 1, 1, 1, 1, 1, 1,
}
};

#endif // RGB_MATRIX_ENABLE
7 changes: 0 additions & 7 deletions keyboards/keychron/q9/ansi_encoder/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,5 @@

#pragma once

/* RGB Matrix Configuration */
#define DRIVER_1_LED_TOTAL 52
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL

/* Encoder Configuration */
#define ENCODER_DEFAULT_POS 0x3

/* Enable caps-lock LED */
#define CAPS_LOCK_LED_INDEX 15
85 changes: 62 additions & 23 deletions keyboards/keychron/q9/ansi_encoder/info.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,70 @@
{
"keyboard_name": "Keychron Q9",
"manufacturer": "Keychron",
"url": "https://github.com/Keychron",
"maintainer": "lalalademaxiya1",
"usb": {
"vid": "0x3434",
"pid": "0x0191",
"device_version": "1.0.0"
},
"rgb_matrix": {
"driver": "snled27351"
},
"matrix_pins": {
"cols": ["A10", "A9", "A8", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "C15", "C14"],
"rows": ["B3", "A15", "A14", "A13"]
},
"diode_direction": "ROW2COL",
"encoder": {
"enabled": true,
"rotary": [
{"pin_a": "B4", "pin_b": "B5"}
]
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"rgb_matrix": {
"layout": [
{"matrix": [0, 0], "x": 2, "y": 0, "flags": 1},
{"matrix": [0, 1], "x": 20, "y": 0, "flags": 4},
{"matrix": [0, 2], "x": 35, "y": 0, "flags": 4},
{"matrix": [0, 3], "x": 50, "y": 0, "flags": 4},
{"matrix": [0, 4], "x": 65, "y": 0, "flags": 4},
{"matrix": [0, 5], "x": 80, "y": 0, "flags": 4},
{"matrix": [0, 6], "x": 94, "y": 0, "flags": 4},
{"matrix": [0, 7], "x": 109, "y": 0, "flags": 4},
{"matrix": [0, 8], "x": 124, "y": 0, "flags": 4},
{"matrix": [0, 9], "x": 139, "y": 0, "flags": 4},
{"matrix": [0, 10], "x": 154, "y": 0, "flags": 4},
{"matrix": [0, 11], "x": 168, "y": 0, "flags": 4},
{"matrix": [0, 12], "x": 183, "y": 0, "flags": 4},
{"matrix": [0, 13], "x": 202, "y": 0, "flags": 4},
{"matrix": [0, 14], "x": 224, "y": 0, "flags": 1},
{"matrix": [1, 0], "x": 4, "y": 21, "flags": 8},
{"matrix": [1, 1], "x": 24, "y": 21, "flags": 4},
{"matrix": [1, 2], "x": 39, "y": 21, "flags": 4},
{"matrix": [1, 3], "x": 54, "y": 21, "flags": 4},
{"matrix": [1, 4], "x": 68, "y": 21, "flags": 4},
{"matrix": [1, 5], "x": 83, "y": 21, "flags": 4},
{"matrix": [1, 6], "x": 98, "y": 21, "flags": 4},
{"matrix": [1, 7], "x": 113, "y": 21, "flags": 4},
{"matrix": [1, 8], "x": 128, "y": 21, "flags": 4},
{"matrix": [1, 9], "x": 142, "y": 21, "flags": 4},
{"matrix": [1, 10], "x": 157, "y": 21, "flags": 4},
{"matrix": [1, 11], "x": 172, "y": 21, "flags": 4},
{"matrix": [1, 13], "x": 196, "y": 21, "flags": 1},
{"matrix": [1, 14], "x": 224, "y": 27, "flags": 1},
{"matrix": [2, 0], "x": 7, "y": 43, "flags": 1},
{"matrix": [2, 2], "x": 31, "y": 43, "flags": 4},
{"matrix": [2, 3], "x": 46, "y": 43, "flags": 4},
{"matrix": [2, 4], "x": 61, "y": 43, "flags": 4},
{"matrix": [2, 5], "x": 76, "y": 43, "flags": 4},
{"matrix": [2, 6], "x": 91, "y": 43, "flags": 4},
{"matrix": [2, 7], "x": 105, "y": 43, "flags": 4},
{"matrix": [2, 8], "x": 120, "y": 43, "flags": 4},
{"matrix": [2, 9], "x": 135, "y": 43, "flags": 4},
{"matrix": [2, 10], "x": 150, "y": 43, "flags": 4},
{"matrix": [2, 11], "x": 165, "y": 43, "flags": 4},
{"matrix": [2, 13], "x": 185, "y": 43, "flags": 1},
{"matrix": [2, 14], "x": 205, "y": 43, "flags": 1},
{"matrix": [3, 0], "x": 0, "y": 64, "flags": 1},
{"matrix": [3, 1], "x": 18, "y": 64, "flags": 1},
{"matrix": [3, 2], "x": 37, "y": 64, "flags": 1},
{"matrix": [3, 6], "x": 92, "y": 64, "flags": 1},
{"matrix": [3, 10], "x": 146, "y": 64, "flags": 1},
{"matrix": [3, 11], "x": 161, "y": 64, "flags": 1},
{"matrix": [3, 12], "x": 176, "y": 64, "flags": 1},
{"matrix": [3, 13], "x": 190, "y": 64, "flags": 1},
{"matrix": [3, 14], "x": 205, "y": 64, "flags": 1},
{"matrix": [1, 12], "x": 220, "y": 64, "flags": 1}
]
},
"usb": {
"device_version": "1.0.0",
"pid": "0x0191"
},
"layouts": {
"LAYOUT_ansi_52": {
"layout": [
Expand All @@ -41,7 +83,6 @@
{"matrix": [0, 12], "x": 12.5, "y": 0.25},
{"matrix": [0, 13], "x": 13.5, "y": 0.25, "w": 1.5},
{"matrix": [0, 14], "x": 15.25, "y": 0},

{"matrix": [1, 0], "x": 0, "y": 1.25, "w": 1.75},
{"matrix": [1, 1], "x": 1.75, "y": 1.25},
{"matrix": [1, 2], "x": 2.75, "y": 1.25},
Expand All @@ -56,7 +97,6 @@
{"matrix": [1, 11], "x": 11.75, "y": 1.25},
{"matrix": [1, 13], "x": 12.75, "y": 1.25, "w": 2.25},
{"matrix": [1, 14], "x": 15.25, "y": 1.25},

{"matrix": [2, 0], "x": 0, "y": 2.25, "w": 2.25},
{"matrix": [2, 2], "x": 2.25, "y": 2.25},
{"matrix": [2, 3], "x": 3.25, "y": 2.25},
Expand All @@ -70,7 +110,6 @@
{"matrix": [2, 11], "x": 11.25, "y": 2.25},
{"matrix": [2, 13], "x": 12.25, "y": 2.25, "w": 1.75},
{"matrix": [2, 14], "x": 14.25, "y": 2.5},

{"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.25},
{"matrix": [3, 1], "x": 1.25, "y": 3.25, "w": 1.25},
{"matrix": [3, 2], "x": 2.5, "y": 3.25, "w": 1.25},
Expand All @@ -84,4 +123,4 @@
]
}
}
}
}
17 changes: 1 addition & 16 deletions keyboards/keychron/q9/ansi_encoder/rules.mk
Original file line number Diff line number Diff line change
@@ -1,16 +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 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
ENCODER_MAP_ENBALE = no
DIP_SWITCH_ENABLE = yes
RGB_MATRIX_ENABLE = yes
# This file intentionally left blank
Loading