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

Move Keychron Q0 and Q0 Plus data-driven configuration; keychron keymap rules.mk cleanup #20168

Merged
merged 18 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
a334544
Move to data-driven for Q0 and Q0 Plus
adophoxia Mar 18, 2023
dfe8099
Merge branch 'develop' of https://github.com/qmk/qmk_firmware into q0…
adophoxia Mar 18, 2023
7b00fd9
Move LED configuration to `info.json`
adophoxia Mar 18, 2023
4de3723
Remove un-necessary `ENCODER_MAP_ENABLE` flag for Q0
adophoxia Mar 18, 2023
aad9ba3
Merge branch 'develop' of https://github.com/qmk/qmk_firmware into q0…
adophoxia Mar 18, 2023
6787739
Merge branch 'develop' of https://github.com/qmk/qmk_firmware into q0…
adophoxia Mar 21, 2023
3c1769f
Merge branch 'develop' of https://github.com/qmk/qmk_firmware into q0…
adophoxia Mar 21, 2023
037eb82
Move `keypresses` and `framebuffer_effects` options back into `config.h`
adophoxia Mar 21, 2023
707f3d5
Merge branch 'develop' of https://github.com/qmk/qmk_firmware into q0…
adophoxia Mar 25, 2023
d740793
Merge branch 'develop' of https://github.com/qmk/qmk_firmware into q0…
adophoxia Mar 31, 2023
fd5925d
Merge branch 'develop' of https://github.com/qmk/qmk_firmware into q0…
adophoxia Apr 3, 2023
bafb915
Add missing `"breathing"` animation to `info.json`
adophoxia Apr 3, 2023
1ff32cb
As above,
adophoxia Apr 3, 2023
0f69a02
Merge branch 'q0-data-driven' of https://github.com/adophoxia/qmk_fir…
adophoxia Apr 3, 2023
058c5eb
Add correct LED flags for Q0 and Q0 Plus
adophoxia Apr 3, 2023
07c7ac1
Merge branch 'develop' of https://github.com/qmk/qmk_firmware into q0…
adophoxia Apr 4, 2023
b414dfb
Removed bootmagic; Fix LED Locations for Q0
adophoxia Apr 4, 2023
900e82d
Merge branch 'develop' of https://github.com/qmk/qmk_firmware into q0…
adophoxia Apr 4, 2023
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
54 changes: 1 addition & 53 deletions keyboards/keychron/q0/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,64 +18,12 @@

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

/* NKRO */
#define FORCE_NKRO

/* turn off effects when suspended */
#define RGB_DISABLE_WHEN_USB_SUSPENDED

/* EEPROM Driver Configuration */
#define WEAR_LEVELING_LOGICAL_SIZE 2048
#define WEAR_LEVELING_BACKING_SIZE (WEAR_LEVELING_LOGICAL_SIZE * 2)

// RGB Matrix Animation modes. Explicitly enabled
// For full list of effects, see:
// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects
// #define ENABLE_RGB_MATRIX_ALPHAS_MODS
// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_BREATHING
// #define ENABLE_RGB_MATRIX_BAND_SAT
// #define ENABLE_RGB_MATRIX_BAND_VAL
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL
// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT
#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL
#define ENABLE_RGB_MATRIX_CYCLE_ALL
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL
#define ENABLE_RGB_MATRIX_DUAL_BEACON
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON
// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS
// #define ENABLE_RGB_MATRIX_RAINDROPS
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
// #define ENABLE_RGB_MATRIX_HUE_BREATHING
// #define ENABLE_RGB_MATRIX_HUE_PENDULUM
// #define ENABLE_RGB_MATRIX_HUE_WAVE
#define ENABLE_RGB_MATRIX_PIXEL_RAIN
// #define ENABLE_RGB_MATRIX_PIXEL_FLOW
// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined
#define ENABLE_RGB_MATRIX_TYPING_HEATMAP
#define ENABLE_RGB_MATRIX_DIGITAL_RAIN
// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
#define ENABLE_RGB_MATRIX_SPLASH
// #define ENABLE_RGB_MATRIX_MULTISPLASH
#define ENABLE_RGB_MATRIX_SOLID_SPLASH
// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH

#define RGB_MATRIX_KEYPRESSES
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
2 changes: 0 additions & 2 deletions keyboards/keychron/q0/rev_0130/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@
#define DRIVER_1_LED_TOTAL 21
#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL

#define RGB_MATRIX_CENTER { 56, 16 }

/* Enable num-lock LED */
#define NUM_LOCK_LED_INDEX 4
71 changes: 70 additions & 1 deletion keyboards/keychron/q0/rev_0130/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,84 @@
"usb": {
"vid": "0x3434",
"pid": "0x0130",
"device_version": "1.0.2"
"device_version": "1.0.2",
"force_nkro": true
},
"matrix_pins": {
"cols": ["A5", "A6", "A7", "B0"],
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
},
"features": {
"audio": false,
"backlight": false,
"bootmagic": true,
"command": false,
"console": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true,
"rgblight": false
},
"diode_direction": "ROW2COL",
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"rgb_matrix": {
"driver": "CKLED2001",
"animations": {
"band_spiral_val": true,
adophoxia marked this conversation as resolved.
Show resolved Hide resolved
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"rainbow_moving_chevron": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"jellybean_raindrops": true,
"pixel_rain": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"solid_reactive_multiwide": true,
"solid_reactive_multinexus": true,
"splash": true,
"solid_splash": true
},
"center_point": [56, 16],
"layout": [
{"flags": 1,"matrix":[0,0], "x":0, "y":0},
{"flags": 1,"matrix":[0,1], "x":37, "y":0},
{"flags": 1,"matrix":[0,2], "x":75, "y":0},
{"flags": 1,"matrix":[0,3], "x":112, "y":0},


{"flags": 9,"matrix":[1,0], "x":0, "y":6},
{"flags": 4,"matrix":[1,1], "x":37, "y":6},
{"flags": 4,"matrix":[1,2], "x":75, "y":6},
{"flags": 4,"matrix":[1,3], "x":112, "y":6},

{"flags": 4,"matrix":[2,0], "x":0, "y":13},
{"flags": 4,"matrix":[2,1], "x":37, "y":13},
{"flags": 4,"matrix":[2,2], "x":75, "y":13},

{"flags": 4,"matrix":[3,0], "x":0, "y":19},
{"flags": 4,"matrix":[3,1], "x":37, "y":19},
{"flags": 4,"matrix":[3,2], "x":75, "y":19},
{"flags": 4,"matrix":[2,3], "x":112, "y":16},

{"flags": 4,"matrix":[4,0], "x":0, "y":25},
{"flags": 4,"matrix":[4,1], "x":37, "y":25},
{"flags": 4,"matrix":[4,2], "x":75, "y":25},

{"flags": 4,"matrix":[5,0], "x":18, "y":32},
{"flags": 4,"matrix":[5,2], "x":75, "y":32},
{"flags": 1,"matrix":[4,3], "x":112, "y":29}
]
},
"layouts": {
"LAYOUT_numpad_6x4": {
"layout": [
Expand Down
1 change: 0 additions & 1 deletion keyboards/keychron/q0/rev_0130/keymaps/keychron/rules.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
VIA_ENABLE = yes
ENCODER_MAP_ENABLE = yes

VPATH += keyboards/keychron/common
SRC += keychron_common.c
33 changes: 0 additions & 33 deletions keyboards/keychron/q0/rev_0130/rev_0130.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,37 +54,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{0, L_1, J_1, K_1}, // 19
{0, C_2, A_2, B_2}, // 20
};

#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, 14 },
{ 11, 12, 13, __ },
{ 15, 16, 17, 20 },
{ 18, __, 19, __ }
},
{
// LED Index to Physical Position
{0,0}, {37,0}, {75,0}, {112,0},
{0,6}, {37,6}, {75,6}, {112,6},
{0,13}, {37,13}, {75,13},
{0,19}, {37,19}, {75,19}, {112,16},
{0,25}, {37,25}, {75,25},
{18,32}, {75,32}, {112,29},
},
{
// LED Index to Flag
1, 1, 1, 1,
9, 4, 4, 4,
4, 4, 4,
4, 4, 4, 4,
4, 4, 4,
4, 4, 1
}
};

#endif // RGB_MATRIX_ENABLE
16 changes: 0 additions & 16 deletions keyboards/keychron/q0/rev_0130/rules.mk
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
# 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 = no
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = CKLED2001
LTO_ENABLE = yes
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = embedded_flash

Expand Down
75 changes: 74 additions & 1 deletion keyboards/keychron/q0/rev_0131/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,26 @@
"usb": {
"vid": "0x3434",
"pid": "0x0131",
"device_version": "1.0.0"
"device_version": "1.0.0",
"force_nkro": true
},
"matrix_pins": {
"cols": ["C14", "C15", "A0", "A1", "A2"],
"rows": ["B5", "B4", "B3", "A15", "A14", "A13"]
},
"features": {
"audio": false,
"backlight": false,
"bootmagic": true,
"command": false,
"console": false,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgb_matrix": true,
"rgblight": false
},
"diode_direction": "ROW2COL",
"encoder": {
"rotary": [
Expand All @@ -23,6 +37,65 @@
},
"processor": "STM32L432",
"bootloader": "stm32-dfu",
"rgb_matrix": {
"driver": "CKLED2001",
"animations": {
"band_spiral_val": true,
adophoxia marked this conversation as resolved.
Show resolved Hide resolved
"breathing": true,
"cycle_all": true,
"cycle_left_right": true,
"cycle_up_down": true,
"rainbow_moving_chevron": true,
"cycle_out_in": true,
"cycle_out_in_dual": true,
"cycle_pinwheel": true,
"cycle_spiral": true,
"dual_beacon": true,
"rainbow_beacon": true,
"jellybean_raindrops": true,
"pixel_rain": true,
"typing_heatmap": true,
"digital_rain": true,
"solid_reactive_simple": true,
"solid_reactive_multiwide": true,
"solid_reactive_multinexus": true,
"splash": true,
"solid_splash": true
},
"layout": [
{"flags": 1, "matrix":[0,1], "x":56, "y":0},
{"flags": 1, "matrix":[0,2], "x":112, "y":0},
{"flags": 1, "matrix":[0,3], "x":168, "y":0},
{"flags": 1, "matrix":[0,4], "x":224, "y":0},

{"flags": 4, "matrix":[1,0], "x":0, "y":15},
{"flags": 8, "matrix":[1,1], "x":56, "y":15},
{"flags": 4, "matrix":[1,2], "x":112, "y":15},
{"flags": 4, "matrix":[1,3], "x":168, "y":15},
{"flags": 4, "matrix":[1,4], "x":224, "y":15},

{"flags": 4, "matrix":[2,0], "x":0, "y":27},
{"flags": 4, "matrix":[2,1], "x":56, "y":27},
{"flags": 4, "matrix":[2,2], "x":112, "y":27},
{"flags": 4, "matrix":[2,3], "x":168, "y":27},
{"flags": 4, "matrix":[2,4], "x":224, "y":34},

{"flags": 4, "matrix":[3,0], "x":0, "y":40},
{"flags": 4, "matrix":[3,1], "x":56, "y":40},
{"flags": 4, "matrix":[3,2], "x":112, "y":40},
{"flags": 4, "matrix":[3,3], "x":168, "y":40},

{"flags": 4, "matrix":[4,0], "x":0, "y":52},
{"flags": 4, "matrix":[4,1], "x":56, "y":52},
{"flags": 4, "matrix":[4,2], "x":112, "y":52},
{"flags": 4, "matrix":[4,3], "x":168, "y":52},
{"flags": 4, "matrix":[4,4], "x":224, "y":58},

{"flags": 4, "matrix":[5,0], "x":0, "y":64},
{"flags": 4, "matrix":[5,1], "x":84, "y":64},
{"flags": 1, "matrix":[5,3], "x":168, "y":64}
]
},
"layouts": {
"LAYOUT_numpad_6x5": {
"layout": [
Expand Down
33 changes: 0 additions & 33 deletions keyboards/keychron/q0/rev_0131/rev_0131.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,37 +59,4 @@ const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = {
{0, F_7, D_7, E_7},
{0, F_9, D_9, E_9},
};

#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, __ },
},
{
// LED Index to Physical Position
{56,0}, {112,0}, {168,0}, {224,0},
{0,15}, {56,15}, {112,15}, {168,15}, {224,15},
{0,27}, {56,27}, {112,27}, {168,27}, {224,34},
{0,40}, {56,40}, {112,40}, {168,40},
{0,52}, {56,52}, {112,52}, {168,52}, {224,58},
{0,64}, {84,64}, {168,64},
},
{
// LED Index to Flag
1, 1, 1, 1,
4, 8, 4, 4, 4,
4, 4, 4, 4, 4,
4, 4, 4, 4,
4, 4, 4, 4, 4,
4, 4, 1,
}
};

#endif // RGB_MATRIX_ENABLE
16 changes: 0 additions & 16 deletions keyboards/keychron/q0/rev_0131/rules.mk
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
# 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 = no
RGB_MATRIX_ENABLE = yes
RGB_MATRIX_DRIVER = CKLED2001
EEPROM_DRIVER = wear_leveling
WEAR_LEVELING_DRIVER = embedded_flash

Expand Down