Skip to content

Commit 147d397

Browse files
adophoxiatzarc
andauthored
Move Keychron Q0 and Q0 Plus data-driven configuration; keychron keymap rules.mk cleanup (qmk#20168)
Co-authored-by: Nick Brassel <[email protected]>
1 parent c224cb9 commit 147d397

File tree

9 files changed

+145
-156
lines changed

9 files changed

+145
-156
lines changed

keyboards/keychron/q0/config.h

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -18,64 +18,12 @@
1818

1919
#define CKLED2001_CURRENT_TUNE { 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70, 0xFF, 0xFF, 0x70 }
2020

21-
/* NKRO */
22-
#define FORCE_NKRO
23-
2421
/* turn off effects when suspended */
2522
#define RGB_DISABLE_WHEN_USB_SUSPENDED
2623

2724
/* EEPROM Driver Configuration */
2825
#define WEAR_LEVELING_LOGICAL_SIZE 2048
2926
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)
3027

31-
// RGB Matrix Animation modes. Explicitly enabled
32-
// For full list of effects, see:
33-
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
34-
// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
35-
// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
36-
// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
37-
#define ENABLE_RGB_MATRIX_BREATHING
38-
// #define ENABLE_RGB_MATRIX_BAND_SAT
39-
// #define ENABLE_RGB_MATRIX_BAND_VAL
40-
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
41-
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
42-
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
43-
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
44-
#define ENABLE_RGB_MATRIX_CYCLE_ALL
45-
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
46-
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
47-
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
48-
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
49-
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
50-
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
51-
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
52-
#define ENABLE_RGB_MATRIX_DUAL_BEACON
53-
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
54-
// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
55-
// #define ENABLE_RGB_MATRIX_RAINDROPS
56-
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
57-
// #define ENABLE_RGB_MATRIX_HUE_BREATHING
58-
// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
59-
// #define ENABLE_RGB_MATRIX_HUE_WAVE
60-
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
61-
// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
62-
// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
63-
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
64-
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
65-
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
66-
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
67-
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
68-
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
69-
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
70-
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
71-
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
72-
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
73-
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
74-
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
75-
#define ENABLE_RGB_MATRIX_SPLASH
76-
// #define ENABLE_RGB_MATRIX_MULTISPLASH
77-
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
78-
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
79-
8028
#define RGB_MATRIX_KEYPRESSES
81-
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
29+
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS

keyboards/keychron/q0/rev_0130/config.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,5 @@
2424
#define DRIVER_1_LED_TOTAL 21
2525
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL
2626

27-
#define RGB_MATRIX_CENTER { 56, 16 }
28-
2927
/* Enable num-lock LED */
3028
#define NUM_LOCK_LED_INDEX 4

keyboards/keychron/q0/rev_0130/info.json

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,84 @@
66
"usb": {
77
"vid": "0x3434",
88
"pid": "0x0130",
9-
"device_version": "1.0.2"
9+
"device_version": "1.0.2",
10+
"force_nkro": true
1011
},
1112
"matrix_pins": {
1213
"cols": ["A5", "A6", "A7", "B0"],
1314
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
1415
},
16+
"features": {
17+
"audio": false,
18+
"backlight": false,
19+
"bootmagic": true,
20+
"command": false,
21+
"console": false,
22+
"extrakey": true,
23+
"mousekey": true,
24+
"nkro": true,
25+
"rgb_matrix": true,
26+
"rgblight": false
27+
},
1528
"diode_direction": "ROW2COL",
1629
"processor": "STM32L432",
1730
"bootloader": "stm32-dfu",
31+
"rgb_matrix": {
32+
"driver": "CKLED2001",
33+
"animations": {
34+
"band_spiral_val": true,
35+
"breathing": true,
36+
"cycle_all": true,
37+
"cycle_left_right": true,
38+
"cycle_up_down": true,
39+
"rainbow_moving_chevron": true,
40+
"cycle_out_in": true,
41+
"cycle_out_in_dual": true,
42+
"cycle_pinwheel": true,
43+
"cycle_spiral": true,
44+
"dual_beacon": true,
45+
"rainbow_beacon": true,
46+
"jellybean_raindrops": true,
47+
"pixel_rain": true,
48+
"typing_heatmap": true,
49+
"digital_rain": true,
50+
"solid_reactive_simple": true,
51+
"solid_reactive_multiwide": true,
52+
"solid_reactive_multinexus": true,
53+
"splash": true,
54+
"solid_splash": true
55+
},
56+
"center_point": [56, 16],
57+
"layout": [
58+
{"flags": 1,"matrix":[0,0], "x":0, "y":0},
59+
{"flags": 1,"matrix":[0,1], "x":37, "y":0},
60+
{"flags": 1,"matrix":[0,2], "x":75, "y":0},
61+
{"flags": 1,"matrix":[0,3], "x":112, "y":0},
62+
63+
64+
{"flags": 9,"matrix":[1,0], "x":0, "y":6},
65+
{"flags": 4,"matrix":[1,1], "x":37, "y":6},
66+
{"flags": 4,"matrix":[1,2], "x":75, "y":6},
67+
{"flags": 4,"matrix":[1,3], "x":112, "y":6},
68+
69+
{"flags": 4,"matrix":[2,0], "x":0, "y":13},
70+
{"flags": 4,"matrix":[2,1], "x":37, "y":13},
71+
{"flags": 4,"matrix":[2,2], "x":75, "y":13},
72+
73+
{"flags": 4,"matrix":[3,0], "x":0, "y":19},
74+
{"flags": 4,"matrix":[3,1], "x":37, "y":19},
75+
{"flags": 4,"matrix":[3,2], "x":75, "y":19},
76+
{"flags": 4,"matrix":[2,3], "x":112, "y":16},
77+
78+
{"flags": 4,"matrix":[4,0], "x":0, "y":25},
79+
{"flags": 4,"matrix":[4,1], "x":37, "y":25},
80+
{"flags": 4,"matrix":[4,2], "x":75, "y":25},
81+
82+
{"flags": 4,"matrix":[5,0], "x":18, "y":32},
83+
{"flags": 4,"matrix":[5,2], "x":75, "y":32},
84+
{"flags": 1,"matrix":[4,3], "x":112, "y":29}
85+
]
86+
},
1887
"layouts": {
1988
"LAYOUT_numpad_6x4": {
2089
"layout": [
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
VIA_ENABLE = yes
2-
ENCODER_MAP_ENABLE = yes
32

43
VPATH += keyboards/keychron/common
54
SRC += keychron_common.c

keyboards/keychron/q0/rev_0130/rev_0130.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -54,37 +54,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
5454
{0, L_1, J_1, K_1}, // 19
5555
{0, C_2, A_2, B_2}, // 20
5656
};
57-
58-
#define __ NO_LED
59-
60-
led_config_t g_led_config = {
61-
{
62-
// Key Matrix to LED Index
63-
{ 0, 1, 2, 3 },
64-
{ 4, 5, 6, 7 },
65-
{ 8, 9, 10, 14 },
66-
{ 11, 12, 13, __ },
67-
{ 15, 16, 17, 20 },
68-
{ 18, __, 19, __ }
69-
},
70-
{
71-
// LED Index to Physical Position
72-
{0,0}, {37,0}, {75,0}, {112,0},
73-
{0,6}, {37,6}, {75,6}, {112,6},
74-
{0,13}, {37,13}, {75,13},
75-
{0,19}, {37,19}, {75,19}, {112,16},
76-
{0,25}, {37,25}, {75,25},
77-
{18,32}, {75,32}, {112,29},
78-
},
79-
{
80-
// LED Index to Flag
81-
1, 1, 1, 1,
82-
9, 4, 4, 4,
83-
4, 4, 4,
84-
4, 4, 4, 4,
85-
4, 4, 4,
86-
4, 4, 1
87-
}
88-
};
89-
9057
#endif // RGB_MATRIX_ENABLE

keyboards/keychron/q0/rev_0130/rules.mk

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
# Build Options
2-
# change yes to no to disable.
3-
#
4-
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
5-
MOUSEKEY_ENABLE = yes # Mouse keys
6-
EXTRAKEY_ENABLE = yes # Audio control and System control
7-
CONSOLE_ENABLE = no # Console for debug
8-
COMMAND_ENABLE = no # Commands for debug and configuration
9-
NKRO_ENABLE = yes # Enable USB N-key Rollover
10-
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
11-
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
12-
AUDIO_ENABLE = no # Audio output
13-
DIP_SWITCH_ENABLE = no
14-
RGB_MATRIX_ENABLE = yes
15-
RGB_MATRIX_DRIVER = CKLED2001
16-
LTO_ENABLE = yes
171
EEPROM_DRIVER = wear_leveling
182
WEAR_LEVELING_DRIVER = embedded_flash
193

keyboards/keychron/q0/rev_0131/info.json

Lines changed: 74 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,26 @@
66
"usb": {
77
"vid": "0x3434",
88
"pid": "0x0131",
9-
"device_version": "1.0.0"
9+
"device_version": "1.0.0",
10+
"force_nkro": true
1011
},
1112
"matrix_pins": {
1213
"cols": ["C14", "C15", "A0", "A1", "A2"],
1314
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
1415
},
16+
"features": {
17+
"audio": false,
18+
"backlight": false,
19+
"bootmagic": true,
20+
"command": false,
21+
"console": false,
22+
"encoder": true,
23+
"extrakey": true,
24+
"mousekey": true,
25+
"nkro": true,
26+
"rgb_matrix": true,
27+
"rgblight": false
28+
},
1529
"diode_direction": "ROW2COL",
1630
"encoder": {
1731
"rotary": [
@@ -23,6 +37,65 @@
2337
},
2438
"processor": "STM32L432",
2539
"bootloader": "stm32-dfu",
40+
"rgb_matrix": {
41+
"driver": "CKLED2001",
42+
"animations": {
43+
"band_spiral_val": true,
44+
"breathing": true,
45+
"cycle_all": true,
46+
"cycle_left_right": true,
47+
"cycle_up_down": true,
48+
"rainbow_moving_chevron": true,
49+
"cycle_out_in": true,
50+
"cycle_out_in_dual": true,
51+
"cycle_pinwheel": true,
52+
"cycle_spiral": true,
53+
"dual_beacon": true,
54+
"rainbow_beacon": true,
55+
"jellybean_raindrops": true,
56+
"pixel_rain": true,
57+
"typing_heatmap": true,
58+
"digital_rain": true,
59+
"solid_reactive_simple": true,
60+
"solid_reactive_multiwide": true,
61+
"solid_reactive_multinexus": true,
62+
"splash": true,
63+
"solid_splash": true
64+
},
65+
"layout": [
66+
{"flags": 1, "matrix":[0,1], "x":56, "y":0},
67+
{"flags": 1, "matrix":[0,2], "x":112, "y":0},
68+
{"flags": 1, "matrix":[0,3], "x":168, "y":0},
69+
{"flags": 1, "matrix":[0,4], "x":224, "y":0},
70+
71+
{"flags": 4, "matrix":[1,0], "x":0, "y":15},
72+
{"flags": 8, "matrix":[1,1], "x":56, "y":15},
73+
{"flags": 4, "matrix":[1,2], "x":112, "y":15},
74+
{"flags": 4, "matrix":[1,3], "x":168, "y":15},
75+
{"flags": 4, "matrix":[1,4], "x":224, "y":15},
76+
77+
{"flags": 4, "matrix":[2,0], "x":0, "y":27},
78+
{"flags": 4, "matrix":[2,1], "x":56, "y":27},
79+
{"flags": 4, "matrix":[2,2], "x":112, "y":27},
80+
{"flags": 4, "matrix":[2,3], "x":168, "y":27},
81+
{"flags": 4, "matrix":[2,4], "x":224, "y":34},
82+
83+
{"flags": 4, "matrix":[3,0], "x":0, "y":40},
84+
{"flags": 4, "matrix":[3,1], "x":56, "y":40},
85+
{"flags": 4, "matrix":[3,2], "x":112, "y":40},
86+
{"flags": 4, "matrix":[3,3], "x":168, "y":40},
87+
88+
{"flags": 4, "matrix":[4,0], "x":0, "y":52},
89+
{"flags": 4, "matrix":[4,1], "x":56, "y":52},
90+
{"flags": 4, "matrix":[4,2], "x":112, "y":52},
91+
{"flags": 4, "matrix":[4,3], "x":168, "y":52},
92+
{"flags": 4, "matrix":[4,4], "x":224, "y":58},
93+
94+
{"flags": 4, "matrix":[5,0], "x":0, "y":64},
95+
{"flags": 4, "matrix":[5,1], "x":84, "y":64},
96+
{"flags": 1, "matrix":[5,3], "x":168, "y":64}
97+
]
98+
},
2699
"layouts": {
27100
"LAYOUT_numpad_6x5": {
28101
"layout": [

keyboards/keychron/q0/rev_0131/rev_0131.c

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -59,37 +59,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
5959
{0, F_7, D_7, E_7},
6060
{0, F_9, D_9, E_9},
6161
};
62-
63-
#define __ NO_LED
64-
65-
led_config_t g_led_config = {
66-
{
67-
// Key Matrix to LED Index
68-
{ __, 0, 1, 2, 3 },
69-
{ 4, 5, 6, 7, 8 },
70-
{ 9, 10, 11, 12, 13 },
71-
{ 14, 15, 16, 17, __ },
72-
{ 18, 19, 20, 21, 22 },
73-
{ 23, 24, __, 25, __ },
74-
},
75-
{
76-
// LED Index to Physical Position
77-
{56,0}, {112,0}, {168,0}, {224,0},
78-
{0,15}, {56,15}, {112,15}, {168,15}, {224,15},
79-
{0,27}, {56,27}, {112,27}, {168,27}, {224,34},
80-
{0,40}, {56,40}, {112,40}, {168,40},
81-
{0,52}, {56,52}, {112,52}, {168,52}, {224,58},
82-
{0,64}, {84,64}, {168,64},
83-
},
84-
{
85-
// LED Index to Flag
86-
1, 1, 1, 1,
87-
4, 8, 4, 4, 4,
88-
4, 4, 4, 4, 4,
89-
4, 4, 4, 4,
90-
4, 4, 4, 4, 4,
91-
4, 4, 1,
92-
}
93-
};
94-
9562
#endif // RGB_MATRIX_ENABLE

keyboards/keychron/q0/rev_0131/rules.mk

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
# Build Options
2-
# change yes to no to disable
3-
#
4-
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
5-
MOUSEKEY_ENABLE = yes # Mouse keys
6-
EXTRAKEY_ENABLE = yes # Audio control and System control
7-
CONSOLE_ENABLE = no # Console for debug
8-
COMMAND_ENABLE = no # Commands for debug and configuration
9-
NKRO_ENABLE = yes # Enable USB N-key Rollover
10-
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
11-
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
12-
AUDIO_ENABLE = no # Audio output
13-
ENCODER_ENABLE = yes # Enable encoder
14-
DIP_SWITCH_ENABLE = no
15-
RGB_MATRIX_ENABLE = yes
16-
RGB_MATRIX_DRIVER = CKLED2001
171
EEPROM_DRIVER = wear_leveling
182
WEAR_LEVELING_DRIVER = embedded_flash
193

0 commit comments

Comments
 (0)