diff options
author | Nick Brassel <nick@tzarc.org> | 2022-11-28 07:54:00 +1100 |
---|---|---|
committer | Nick Brassel <nick@tzarc.org> | 2022-11-28 07:54:00 +1100 |
commit | 4020674163fc80914059c4c9c3be5c0ae00bd150 (patch) | |
tree | 6f4187d72b04d03572adf507502afbda9726d696 /keyboards/keychron | |
parent | 8f9b49dc5b05fd3421e47aa76822a5b2199dfca6 (diff) | |
parent | 9e78e65a566487b2f4fe7b663971a01deb6ddad2 (diff) |
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'keyboards/keychron')
70 files changed, 149 insertions, 135 deletions
diff --git a/keyboards/keychron/q0/q0.c b/keyboards/keychron/q0/q0.c index d17ab77f47..554476ad8c 100644 --- a/keyboards/keychron/q0/q0.c +++ b/keyboards/keychron/q0/q0.c @@ -42,7 +42,10 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return true; } -__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); if (host_keyboard_led_state().num_lock) { @@ -52,6 +55,7 @@ __attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, RGB_MATRIX_INDICATOR_SET_COLOR(NUM_LOCK_LED_INDEX, 0, 0, 0); } } + return true; } #endif // NUM_LOCK_LED_INDEX diff --git a/keyboards/keychron/q0/rev_0130/config.h b/keyboards/keychron/q0/rev_0130/config.h index e7fabed664..126d636589 100644 --- a/keyboards/keychron/q0/rev_0130/config.h +++ b/keyboards/keychron/q0/rev_0130/config.h @@ -18,7 +18,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 21 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define RGB_MATRIX_LED_COUNT DRIVER_1_LED_TOTAL /* Enable num-lock LED */ #define NUM_LOCK_LED_INDEX 4 diff --git a/keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c b/keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c index 6a05648074..387ff2d686 100644 --- a/keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c +++ b/keyboards/keychron/q0/rev_0130/keymaps/default/keymap.c @@ -20,12 +20,12 @@ enum layers { _BASE, _FN1}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_numpad_6x4( - MO(_FN1), KC_ESC, KC_BSPACE, KC_TAB, - KC_NUMLOCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, - KC_P0, KC_PDOT, KC_PENT), + MO(_FN1), KC_ESC, KC_BSPC, KC_TAB, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), [_FN1] = LAYOUT_numpad_6x4( _______, KC_MUTE, KC_VOLD, KC_VOLU, diff --git a/keyboards/keychron/q0/rev_0130/keymaps/via/keymap.c b/keyboards/keychron/q0/rev_0130/keymaps/via/keymap.c index 078ede4041..32fd198cf0 100644 --- a/keyboards/keychron/q0/rev_0130/keymaps/via/keymap.c +++ b/keyboards/keychron/q0/rev_0130/keymaps/via/keymap.c @@ -20,12 +20,12 @@ enum layers { _BASE, _FN1, _RESERVED1, _RESERVED2 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_numpad_6x4( - MO(_FN1), KC_ESC, KC_BSPACE, KC_TAB, - KC_NUMLOCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, - KC_P0, KC_PDOT, KC_PENT), + MO(_FN1), KC_ESC, KC_BSPC, KC_TAB, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), [_FN1] = LAYOUT_numpad_6x4( _______, KC_MUTE, KC_VOLD, KC_VOLU, diff --git a/keyboards/keychron/q0/rev_0130/rev_0130.c b/keyboards/keychron/q0/rev_0130/rev_0130.c index 64c4842086..b968361c7e 100644 --- a/keyboards/keychron/q0/rev_0130/rev_0130.c +++ b/keyboards/keychron/q0/rev_0130/rev_0130.c @@ -20,7 +20,7 @@ // clang-format off -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to CKLED manual for these locations * driver * | R location diff --git a/keyboards/keychron/q1/config.h b/keyboards/keychron/q1/config.h index 50a5b70cc3..669e9ef7ba 100644 --- a/keyboards/keychron/q1/config.h +++ b/keyboards/keychron/q1/config.h @@ -37,6 +37,9 @@ /* Disable DIP switch in matrix data */ #define MATRIX_MASKED +/* NKRO */ +#define FORCE_NKRO + /* Disable RGB lighting when PC is in suspend */ #define RGB_DISABLE_WHEN_USB_SUSPENDED @@ -88,6 +91,3 @@ #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
\ No newline at end of file diff --git a/keyboards/keychron/q1/iso_encoder/config.h b/keyboards/keychron/q1/iso_encoder/config.h index 089ea19973..984b3c77d0 100644 --- a/keyboards/keychron/q1/iso_encoder/config.h +++ b/keyboards/keychron/q1/iso_encoder/config.h @@ -31,7 +31,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 59 #define DRIVER_2_LED_TOTAL 24 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ #define ENCODERS_PAD_A { E6 } diff --git a/keyboards/keychron/q1/iso_encoder/iso_encoder.c b/keyboards/keychron/q1/iso_encoder/iso_encoder.c index 0106084973..c6563ad318 100644 --- a/keyboards/keychron/q1/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q1/iso_encoder/iso_encoder.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -147,4 +147,4 @@ led_config_t g_led_config = { } }; -#endif // RGB_MATRIX_ENABLE
\ No newline at end of file +#endif // RGB_MATRIX_ENABLE diff --git a/keyboards/keychron/q1/rev_0100/config.h b/keyboards/keychron/q1/rev_0100/config.h index 1b8c65165c..0a30f7d82d 100644 --- a/keyboards/keychron/q1/rev_0100/config.h +++ b/keyboards/keychron/q1/rev_0100/config.h @@ -23,4 +23,4 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 59 #define DRIVER_2_LED_TOTAL 23 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
\ No newline at end of file +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
\ No newline at end of file diff --git a/keyboards/keychron/q1/rev_0100/keymaps/gtg465x/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0100/keymaps/gtg465x/rgb_matrix_user.c index 9bc7231ece..b7d12f9466 100644 --- a/keyboards/keychron/q1/rev_0100/keymaps/gtg465x/rgb_matrix_user.c +++ b/keyboards/keychron/q1/rev_0100/keymaps/gtg465x/rgb_matrix_user.c @@ -18,7 +18,7 @@ #include "rgb_matrix_user.h" #include "keymap_user.h" -keypos_t led_index_key_position[DRIVER_LED_TOTAL]; +keypos_t led_index_key_position[RGB_MATRIX_LED_COUNT]; void rgb_matrix_init_user(void) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) { @@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) { } } -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { uint8_t current_layer = get_highest_layer(layer_state); switch (current_layer) { case MAC_BASE: @@ -49,6 +49,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif break; } + return false; } void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t layer, bool (*is_keycode)(uint16_t), uint8_t red, uint8_t green, uint8_t blue) { diff --git a/keyboards/keychron/q1/rev_0100/keymaps/mkillewald/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0100/keymaps/mkillewald/rgb_matrix_user.c index f06039af06..c6fa5f1f15 100644 --- a/keyboards/keychron/q1/rev_0100/keymaps/mkillewald/rgb_matrix_user.c +++ b/keyboards/keychron/q1/rev_0100/keymaps/mkillewald/rgb_matrix_user.c @@ -18,7 +18,7 @@ #include "rgb_matrix_user.h" #include "keymap_user.h" -keypos_t led_index_key_position[DRIVER_LED_TOTAL]; +keypos_t led_index_key_position[RGB_MATRIX_LED_COUNT]; void rgb_matrix_init_user(void) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) { @@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) { } } -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { uint8_t current_layer = get_highest_layer(layer_state); switch (current_layer) { case MAC_BASE: @@ -54,6 +54,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } break; } + return false; } void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t layer, bool (*is_keycode)(uint16_t), uint8_t red, uint8_t green, uint8_t blue) { @@ -67,11 +68,11 @@ void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t l bool is_caps_lock_indicator(uint16_t keycode) { bool indicator = keycode == KC_CAPS; - + if (get_caps_lock_light_tab()) { indicator = keycode == KC_TAB || keycode == KC_CAPS; } - + if (get_caps_lock_light_alphas()) { return (KC_A <= keycode && keycode <= KC_Z) || indicator; } else { @@ -80,4 +81,4 @@ bool is_caps_lock_indicator(uint16_t keycode) { } bool is_transparent(uint16_t keycode) { return keycode == KC_TRNS; } -bool is_not_transparent(uint16_t keycode) { return keycode != KC_TRNS; }
\ No newline at end of file +bool is_not_transparent(uint16_t keycode) { return keycode != KC_TRNS; } diff --git a/keyboards/keychron/q1/rev_0100/keymaps/teimor/config.h b/keyboards/keychron/q1/rev_0100/keymaps/teimor/config.h index c3c10a1c2b..4378af4f58 100644 --- a/keyboards/keychron/q1/rev_0100/keymaps/teimor/config.h +++ b/keyboards/keychron/q1/rev_0100/keymaps/teimor/config.h @@ -27,6 +27,6 @@ # define CAPS_LOCK_INDICATOR_COLOR RGB_RED # define CAPS_LOCK_INDICATOR_LIGHT_60 # define FN_LAYER_TRANSPARENT_KEYS_OFF -# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR // Sets the default mode, if none has been set -# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set +# define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_SOLID_COLOR // Sets the default mode, if none has been set +# define RGB_MATRIX_DEFAULT_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set #endif diff --git a/keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c index 77f1c1011b..fbc37fb5bf 100644 --- a/keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c +++ b/keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c @@ -18,7 +18,7 @@ #include "rgb_matrix_user.h" #include "keymap_user.h" -keypos_t led_index_key_position[DRIVER_LED_TOTAL]; +keypos_t led_index_key_position[RGB_MATRIX_LED_COUNT]; void rgb_matrix_init_user(void) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) { @@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) { } } -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { uint8_t current_layer = get_highest_layer(layer_state | default_layer_state); switch (current_layer) { case MAC_BASE: @@ -59,6 +59,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif break; } + return false; } void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t layer, bool (*is_keycode)(uint16_t), uint8_t red, uint8_t green, uint8_t blue) { diff --git a/keyboards/keychron/q1/rev_0100/rev_0100.c b/keyboards/keychron/q1/rev_0100/rev_0100.c index f424669527..2c87a8241e 100644 --- a/keyboards/keychron/q1/rev_0100/rev_0100.c +++ b/keyboards/keychron/q1/rev_0100/rev_0100.c @@ -17,7 +17,7 @@ #include "quantum.h" -const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q1/rev_0101/config.h b/keyboards/keychron/q1/rev_0101/config.h index 58d77477ca..b38261abf6 100644 --- a/keyboards/keychron/q1/rev_0101/config.h +++ b/keyboards/keychron/q1/rev_0101/config.h @@ -23,7 +23,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 59 #define DRIVER_2_LED_TOTAL 23 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder used pins */ #define ENCODERS_PAD_A { E6 } diff --git a/keyboards/keychron/q1/rev_0101/rev_0101.c b/keyboards/keychron/q1/rev_0101/rev_0101.c index dd7f69529e..4edd2c761f 100644 --- a/keyboards/keychron/q1/rev_0101/rev_0101.c +++ b/keyboards/keychron/q1/rev_0101/rev_0101.c @@ -17,7 +17,7 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q1/rev_0102/config.h b/keyboards/keychron/q1/rev_0102/config.h index 7aa0ae8662..b9b33cf320 100644 --- a/keyboards/keychron/q1/rev_0102/config.h +++ b/keyboards/keychron/q1/rev_0102/config.h @@ -23,4 +23,4 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 59 #define DRIVER_2_LED_TOTAL 24 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
\ No newline at end of file +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)
\ No newline at end of file diff --git a/keyboards/keychron/q1/rev_0102/keymaps/kubahorak/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0102/keymaps/kubahorak/rgb_matrix_user.c index 8650f30df1..638aa77eb0 100644 --- a/keyboards/keychron/q1/rev_0102/keymaps/kubahorak/rgb_matrix_user.c +++ b/keyboards/keychron/q1/rev_0102/keymaps/kubahorak/rgb_matrix_user.c @@ -18,7 +18,7 @@ #include "rgb_matrix_user.h" #include "keymap_user.h" -keypos_t led_index_key_position[DRIVER_LED_TOTAL]; +keypos_t led_index_key_position[RGB_MATRIX_LED_COUNT]; void rgb_matrix_init_user(void) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) { @@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) { } } -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { uint8_t current_layer = get_highest_layer(layer_state); switch (current_layer) { case MAC_BASE: @@ -49,6 +49,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif break; } + return false; } void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t layer, bool (*is_keycode)(uint16_t), uint8_t red, uint8_t green, uint8_t blue) { diff --git a/keyboards/keychron/q1/rev_0102/keymaps/mkillewald_iso/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0102/keymaps/mkillewald_iso/rgb_matrix_user.c index f06039af06..c6fa5f1f15 100644 --- a/keyboards/keychron/q1/rev_0102/keymaps/mkillewald_iso/rgb_matrix_user.c +++ b/keyboards/keychron/q1/rev_0102/keymaps/mkillewald_iso/rgb_matrix_user.c @@ -18,7 +18,7 @@ #include "rgb_matrix_user.h" #include "keymap_user.h" -keypos_t led_index_key_position[DRIVER_LED_TOTAL]; +keypos_t led_index_key_position[RGB_MATRIX_LED_COUNT]; void rgb_matrix_init_user(void) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) { @@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) { } } -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { uint8_t current_layer = get_highest_layer(layer_state); switch (current_layer) { case MAC_BASE: @@ -54,6 +54,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } break; } + return false; } void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t layer, bool (*is_keycode)(uint16_t), uint8_t red, uint8_t green, uint8_t blue) { @@ -67,11 +68,11 @@ void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t l bool is_caps_lock_indicator(uint16_t keycode) { bool indicator = keycode == KC_CAPS; - + if (get_caps_lock_light_tab()) { indicator = keycode == KC_TAB || keycode == KC_CAPS; } - + if (get_caps_lock_light_alphas()) { return (KC_A <= keycode && keycode <= KC_Z) || indicator; } else { @@ -80,4 +81,4 @@ bool is_caps_lock_indicator(uint16_t keycode) { } bool is_transparent(uint16_t keycode) { return keycode == KC_TRNS; } -bool is_not_transparent(uint16_t keycode) { return keycode != KC_TRNS; }
\ No newline at end of file +bool is_not_transparent(uint16_t keycode) { return keycode != KC_TRNS; } diff --git a/keyboards/keychron/q1/rev_0102/keymaps/victorsavu3/config.h b/keyboards/keychron/q1/rev_0102/keymaps/victorsavu3/config.h index 8120a9352a..02f08db4a7 100644 --- a/keyboards/keychron/q1/rev_0102/keymaps/victorsavu3/config.h +++ b/keyboards/keychron/q1/rev_0102/keymaps/victorsavu3/config.h @@ -56,12 +56,12 @@ #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP +#define RGB_MATRIX_DEFAULT_MODE RGB_MATRIX_TYPING_HEATMAP #define RGB_MATRIX_TYPING_HEATMAP_DECREASE_DELAY_MS 50 // Unicode for Linux -#define UNICODE_SELECTED_MODES UC_LNX +#define UNICODE_SELECTED_MODES UNICODE_MODE_LINUX #define UNICODE_KEY_LNX LCTL(LSFT(KC_U)) // Leader config diff --git a/keyboards/keychron/q1/rev_0102/keymaps/victorsavu3/keymap.c b/keyboards/keychron/q1/rev_0102/keymaps/victorsavu3/keymap.c index 1f56295fa9..8478ccbe57 100644 --- a/keyboards/keychron/q1/rev_0102/keymaps/victorsavu3/keymap.c +++ b/keyboards/keychron/q1/rev_0102/keymaps/victorsavu3/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, X(SAD), KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, X(GRIN), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, - KC_LEAD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, + QK_LEAD, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGDN, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(WIN_FN),KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), @@ -84,7 +84,7 @@ void matrix_scan_user(void) { leading = false; leader_end(); - SEQ_ONE_KEY(KC_LEAD) { + SEQ_ONE_KEY(QK_LEAD) { tap_code(KC_CAPS); } diff --git a/keyboards/keychron/q1/rev_0102/rev_0102.c b/keyboards/keychron/q1/rev_0102/rev_0102.c index f1468d1094..5304a602c3 100644 --- a/keyboards/keychron/q1/rev_0102/rev_0102.c +++ b/keyboards/keychron/q1/rev_0102/rev_0102.c @@ -17,7 +17,7 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q2/config.h b/keyboards/keychron/q2/config.h index 511cc4f5ac..5961b62929 100644 --- a/keyboards/keychron/q2/config.h +++ b/keyboards/keychron/q2/config.h @@ -110,8 +110,3 @@ #define ENABLE_RGB_MATRIX_MULTISPLASH #define ENABLE_RGB_MATRIX_SOLID_SPLASH #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH - -/* Allow VIA to edit lighting */ -#ifdef VIA_ENABLE -# define VIA_QMK_RGBLIGHT_ENABLE -#endif diff --git a/keyboards/keychron/q2/rev_0110/config.h b/keyboards/keychron/q2/rev_0110/config.h index f30b81b3af..6c39432b74 100644 --- a/keyboards/keychron/q2/rev_0110/config.h +++ b/keyboards/keychron/q2/rev_0110/config.h @@ -19,4 +19,4 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 34 #define DRIVER_2_LED_TOTAL 33 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/rgb_matrix_user.c b/keyboards/keychron/q2/rev_0110/keymaps/ladduro/rgb_matrix_user.c index 19ddd54aa8..604f54a705 100644 --- a/keyboards/keychron/q2/rev_0110/keymaps/ladduro/rgb_matrix_user.c +++ b/keyboards/keychron/q2/rev_0110/keymaps/ladduro/rgb_matrix_user.c @@ -18,7 +18,7 @@ #include "rgb_matrix_user.h" #include "keymap_user.h" -keypos_t led_index_key_position[DRIVER_LED_TOTAL]; +keypos_t led_index_key_position[RGB_MATRIX_LED_COUNT]; void rgb_matrix_init_user(void) { for (uint8_t row = 0; row < MATRIX_ROWS; row++) { @@ -31,7 +31,7 @@ void rgb_matrix_init_user(void) { } } -void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { uint8_t current_layer = get_highest_layer(layer_state); switch (current_layer) { case MAC_BASE: @@ -50,6 +50,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { #endif break; } + return false; } void rgb_matrix_set_color_by_keycode(uint8_t led_min, uint8_t led_max, uint8_t layer, bool (*is_keycode)(uint16_t), uint8_t red, uint8_t green, uint8_t blue) { @@ -69,4 +70,4 @@ bool is_caps_lock_indicator(uint16_t keycode) { #endif } -bool is_transparent(uint16_t keycode) { return keycode == KC_TRNS; }
\ No newline at end of file +bool is_transparent(uint16_t keycode) { return keycode == KC_TRNS; } diff --git a/keyboards/keychron/q2/rev_0110/rev_0110.c b/keyboards/keychron/q2/rev_0110/rev_0110.c index fe52490177..125872602e 100644 --- a/keyboards/keychron/q2/rev_0110/rev_0110.c +++ b/keyboards/keychron/q2/rev_0110/rev_0110.c @@ -17,7 +17,7 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to CKLED manual for these locations * driver * | R location diff --git a/keyboards/keychron/q2/rev_0111/config.h b/keyboards/keychron/q2/rev_0111/config.h index 249e589019..8ef6c542f0 100644 --- a/keyboards/keychron/q2/rev_0111/config.h +++ b/keyboards/keychron/q2/rev_0111/config.h @@ -19,7 +19,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 34 #define DRIVER_2_LED_TOTAL 33 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder used pins */ #define ENCODERS_PAD_A { A10 } diff --git a/keyboards/keychron/q2/rev_0111/rev_0111.c b/keyboards/keychron/q2/rev_0111/rev_0111.c index cbadafc458..1bada84daa 100644 --- a/keyboards/keychron/q2/rev_0111/rev_0111.c +++ b/keyboards/keychron/q2/rev_0111/rev_0111.c @@ -17,7 +17,7 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to CKLED manual for these locations * driver * | R location diff --git a/keyboards/keychron/q2/rev_0112/config.h b/keyboards/keychron/q2/rev_0112/config.h index 4bab401a01..35a86d5839 100644 --- a/keyboards/keychron/q2/rev_0112/config.h +++ b/keyboards/keychron/q2/rev_0112/config.h @@ -19,4 +19,4 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 34 #define DRIVER_2_LED_TOTAL 34 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) diff --git a/keyboards/keychron/q2/rev_0112/rev_0112.c b/keyboards/keychron/q2/rev_0112/rev_0112.c index b994679725..cf2bb34857 100644 --- a/keyboards/keychron/q2/rev_0112/rev_0112.c +++ b/keyboards/keychron/q2/rev_0112/rev_0112.c @@ -17,7 +17,7 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q2/rev_0113/config.h b/keyboards/keychron/q2/rev_0113/config.h index 8f7fbef73a..8dd123e3bb 100644 --- a/keyboards/keychron/q2/rev_0113/config.h +++ b/keyboards/keychron/q2/rev_0113/config.h @@ -19,7 +19,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 34 #define DRIVER_2_LED_TOTAL 34 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder used pins */ #define ENCODERS_PAD_A { A10 } diff --git a/keyboards/keychron/q2/rev_0113/keymaps/dhertz/keymap.c b/keyboards/keychron/q2/rev_0113/keymaps/dhertz/keymap.c index 16c2a6d784..0d4f7e6a22 100644 --- a/keyboards/keychron/q2/rev_0113/keymaps/dhertz/keymap.c +++ b/keyboards/keychron/q2/rev_0113/keymaps/dhertz/keymap.c @@ -43,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CMD_SFT_L, KC_TRNS, KC_TRNS, KC_NUBS, KC_TRNS, KC_END, KC_TRNS, KC_NUBS, KC_TRNS, KC_TRNS, CMD_ALT_C, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END ), }; @@ -67,7 +67,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } else { tap_code_delay(KC_VOLD, 10); } - } else { + } else { if ((get_mods() & MOD_BIT(KC_LCMD)) != MOD_BIT(KC_LCMD)) { register_code(KC_LCMD); defer_exec(20, cancel_cmd, NULL); @@ -81,7 +81,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { return false; } -void rgb_matrix_indicators_kb(void) { +bool rgb_matrix_indicators_user(void) { switch(get_highest_layer(layer_state|default_layer_state)) { case 1: rgb_matrix_set_color_all(RGB_BLACK); @@ -91,4 +91,5 @@ void rgb_matrix_indicators_kb(void) { rgb_matrix_set_color_all(RGB_BLACK); break; } + return false; } diff --git a/keyboards/keychron/q2/rev_0113/rev_0113.c b/keyboards/keychron/q2/rev_0113/rev_0113.c index e1d66976dd..2aa3ab2a6d 100644 --- a/keyboards/keychron/q2/rev_0113/rev_0113.c +++ b/keyboards/keychron/q2/rev_0113/rev_0113.c @@ -17,7 +17,7 @@ #include "quantum.h" #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q3/ansi/ansi.c b/keyboards/keychron/q3/ansi/ansi.c index 46ebe44144..beff3bc5ec 100644 --- a/keyboards/keychron/q3/ansi/ansi.c +++ b/keyboards/keychron/q3/ansi/ansi.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q3/ansi/config.h b/keyboards/keychron/q3/ansi/config.h index 8535f02cc2..f7c1c16931 100644 --- a/keyboards/keychron/q3/ansi/config.h +++ b/keyboards/keychron/q3/ansi/config.h @@ -26,7 +26,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 48 #define DRIVER_2_LED_TOTAL 39 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define CKLED2001_CURRENT_TUNE \ { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } diff --git a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c index 8e5f692e38..13f6c26d2d 100644 --- a/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q3/ansi_encoder/ansi_encoder.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q3/ansi_encoder/config.h b/keyboards/keychron/q3/ansi_encoder/config.h index 0388b6dd31..505a45b79c 100644 --- a/keyboards/keychron/q3/ansi_encoder/config.h +++ b/keyboards/keychron/q3/ansi_encoder/config.h @@ -23,7 +23,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 48 #define DRIVER_2_LED_TOTAL 39 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } diff --git a/keyboards/keychron/q3/iso/config.h b/keyboards/keychron/q3/iso/config.h index dc8a3b03e9..c6992eb52b 100644 --- a/keyboards/keychron/q3/iso/config.h +++ b/keyboards/keychron/q3/iso/config.h @@ -26,7 +26,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 48 #define DRIVER_2_LED_TOTAL 40 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define CKLED2001_CURRENT_TUNE \ { 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44, 0x9D, 0x9D, 0x44 } diff --git a/keyboards/keychron/q3/iso/iso.c b/keyboards/keychron/q3/iso/iso.c index 04ee78092e..e753a39c1b 100644 --- a/keyboards/keychron/q3/iso/iso.c +++ b/keyboards/keychron/q3/iso/iso.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q3/iso_encoder/config.h b/keyboards/keychron/q3/iso_encoder/config.h index 4e62c1d7a0..0cc5fbf1d9 100644 --- a/keyboards/keychron/q3/iso_encoder/config.h +++ b/keyboards/keychron/q3/iso_encoder/config.h @@ -23,7 +23,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 48 #define DRIVER_2_LED_TOTAL 40 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ #define ENCODERS_PAD_A { A10 } diff --git a/keyboards/keychron/q3/iso_encoder/iso_encoder.c b/keyboards/keychron/q3/iso_encoder/iso_encoder.c index 06955f879d..02aac01ddc 100644 --- a/keyboards/keychron/q3/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q3/iso_encoder/iso_encoder.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q3/jis/config.h b/keyboards/keychron/q3/jis/config.h index b6750c6567..856dd14df4 100644 --- a/keyboards/keychron/q3/jis/config.h +++ b/keyboards/keychron/q3/jis/config.h @@ -28,7 +28,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 48 #define DRIVER_2_LED_TOTAL 43 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define CKLED2001_CURRENT_TUNE \ { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } diff --git a/keyboards/keychron/q3/jis/jis.c b/keyboards/keychron/q3/jis/jis.c index cbe433eb4e..20983c6a5f 100644 --- a/keyboards/keychron/q3/jis/jis.c +++ b/keyboards/keychron/q3/jis/jis.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q3/jis/keymaps/default/keymap.c b/keyboards/keychron/q3/jis/keymaps/default/keymap.c index 28ffd7f4a7..bd764ecdf3 100644 --- a/keyboards/keychron/q3/jis/keymaps/default/keymap.c +++ b/keyboards/keychron/q3/jis/keymaps/default/keymap.c @@ -26,11 +26,11 @@ enum layers{ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MAC_BASE] = LAYOUT_jis_91( KC_ESC, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LOPT, KC_LCMD, KC_HANJ, KC_SPC, KC_HAEN, KC_RCMD, KC_ROPT, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPT, KC_LCMD, KC_LNG2, KC_SPC, KC_LNG1, KC_RCMD, KC_ROPT, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [MAC_FN] = LAYOUT_jis_91( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, @@ -42,11 +42,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [WIN_BASE] = LAYOUT_jis_91( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NO, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LWIN, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_INT5, KC_SPC, KC_INT4, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [WIN_FN] = LAYOUT_jis_91( _______, KC_BRID, KC_BRIU, _______, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, diff --git a/keyboards/keychron/q3/jis/keymaps/keychron/keymap.c b/keyboards/keychron/q3/jis/keymaps/keychron/keymap.c index 30fc9cb8a2..b65d92ae62 100644 --- a/keyboards/keychron/q3/jis/keymaps/keychron/keymap.c +++ b/keyboards/keychron/q3/jis/keymaps/keychron/keymap.c @@ -27,11 +27,11 @@ enum layers{ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MAC_BASE] = LAYOUT_jis_91( KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_SNAP, KC_SIRI, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LOPTN, KC_LCMMD, KC_HANJ, KC_SPC, KC_HAEN, KC_RCMMD, KC_ROPTN, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPTN, KC_LCMMD, KC_LNG2, KC_SPC, KC_LNG1, KC_RCMMD, KC_ROPTN, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [MAC_FN] = LAYOUT_jis_91( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, @@ -43,11 +43,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [WIN_BASE] = LAYOUT_jis_91( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_CRTA, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LWIN, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_INT5, KC_SPC, KC_INT4, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [WIN_FN] = LAYOUT_jis_91( _______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, diff --git a/keyboards/keychron/q3/jis/keymaps/via/keymap.c b/keyboards/keychron/q3/jis/keymaps/via/keymap.c index 28ffd7f4a7..bd764ecdf3 100644 --- a/keyboards/keychron/q3/jis/keymaps/via/keymap.c +++ b/keyboards/keychron/q3/jis/keymaps/via/keymap.c @@ -26,11 +26,11 @@ enum layers{ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MAC_BASE] = LAYOUT_jis_91( KC_ESC, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LOPT, KC_LCMD, KC_HANJ, KC_SPC, KC_HAEN, KC_RCMD, KC_ROPT, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPT, KC_LCMD, KC_LNG2, KC_SPC, KC_LNG1, KC_RCMD, KC_ROPT, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [MAC_FN] = LAYOUT_jis_91( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_TOG, @@ -42,11 +42,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [WIN_BASE] = LAYOUT_jis_91( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_NO, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LWIN, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_INT5, KC_SPC, KC_INT4, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [WIN_FN] = LAYOUT_jis_91( _______, KC_BRID, KC_BRIU, _______, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, RGB_TOG, diff --git a/keyboards/keychron/q3/jis_encoder/config.h b/keyboards/keychron/q3/jis_encoder/config.h index 0d728773e9..322f04cb0f 100644 --- a/keyboards/keychron/q3/jis_encoder/config.h +++ b/keyboards/keychron/q3/jis_encoder/config.h @@ -25,7 +25,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 49 #define DRIVER_2_LED_TOTAL 43 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #define CKLED2001_CURRENT_TUNE \ { 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44, 0x94, 0x94, 0x44 } diff --git a/keyboards/keychron/q3/jis_encoder/jis_encoder.c b/keyboards/keychron/q3/jis_encoder/jis_encoder.c index cdb98d53b0..efaf5fc5f2 100644 --- a/keyboards/keychron/q3/jis_encoder/jis_encoder.c +++ b/keyboards/keychron/q3/jis_encoder/jis_encoder.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q3/jis_encoder/keymaps/default/keymap.c b/keyboards/keychron/q3/jis_encoder/keymaps/default/keymap.c index 668efb91f2..ca51f194a2 100644 --- a/keyboards/keychron/q3/jis_encoder/keymaps/default/keymap.c +++ b/keyboards/keychron/q3/jis_encoder/keymaps/default/keymap.c @@ -26,11 +26,11 @@ enum layers{ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MAC_BASE] = LAYOUT_jis_92( KC_ESC, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MUTE, KC_NO, KC_NO, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LOPT, KC_LCMD, KC_HANJ, KC_SPC, KC_HAEN, KC_RCMD, KC_ROPT, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPT, KC_LCMD, KC_LNG2, KC_SPC, KC_LNG1, KC_RCMD, KC_ROPT, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [MAC_FN] = LAYOUT_jis_92( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, _______, _______, RGB_TOG, @@ -42,11 +42,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [WIN_BASE] = LAYOUT_jis_92( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_PSCR, KC_NO, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LWIN, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_INT5, KC_SPC, KC_INT4, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [WIN_FN] = LAYOUT_jis_92( _______, KC_BRID, KC_BRIU, _______, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, RGB_TOG, _______, _______, RGB_TOG, diff --git a/keyboards/keychron/q3/jis_encoder/keymaps/keychron/keymap.c b/keyboards/keychron/q3/jis_encoder/keymaps/keychron/keymap.c index b20f267f4c..48532104f6 100644 --- a/keyboards/keychron/q3/jis_encoder/keymaps/keychron/keymap.c +++ b/keyboards/keychron/q3/jis_encoder/keymaps/keychron/keymap.c @@ -27,11 +27,11 @@ enum layers{ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MAC_BASE] = LAYOUT_jis_92( KC_ESC, KC_BRID, KC_BRIU, KC_MCTL, KC_LPAD, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MUTE, KC_SNAP, KC_SIRI, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LOPTN, KC_LCMMD, KC_HANJ, KC_SPC, KC_HAEN, KC_RCMMD, KC_ROPTN, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPTN, KC_LCMMD, KC_LNG2, KC_SPC, KC_LNG1, KC_RCMMD, KC_ROPTN, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [MAC_FN] = LAYOUT_jis_92( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, _______, _______, RGB_TOG, @@ -43,11 +43,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [WIN_BASE] = LAYOUT_jis_92( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_PSCR, KC_CRTA, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LWIN, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_INT5, KC_SPC, KC_INT4, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [WIN_FN] = LAYOUT_jis_92( _______, KC_BRID, KC_BRIU, KC_TASK, KC_FLXP, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, RGB_TOG, _______, _______, RGB_TOG, diff --git a/keyboards/keychron/q3/jis_encoder/keymaps/via/keymap.c b/keyboards/keychron/q3/jis_encoder/keymaps/via/keymap.c index 532ada52dc..f14ca16c8b 100644 --- a/keyboards/keychron/q3/jis_encoder/keymaps/via/keymap.c +++ b/keyboards/keychron/q3/jis_encoder/keymaps/via/keymap.c @@ -26,11 +26,11 @@ enum layers{ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MAC_BASE] = LAYOUT_jis_92( KC_ESC, KC_BRID, KC_BRIU, KC_NO, KC_NO, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_MUTE, KC_NO, KC_NO, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LOPT, KC_LCMD, KC_HANJ, KC_SPC, KC_HAEN, KC_RCMD, KC_ROPT, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LOPT, KC_LCMD, KC_LNG2, KC_SPC, KC_LNG1, KC_RCMD, KC_ROPT, MO(MAC_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [MAC_FN] = LAYOUT_jis_92( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, _______, _______, RGB_TOG, @@ -42,11 +42,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [WIN_BASE] = LAYOUT_jis_92( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MUTE, KC_PSCR, KC_NO, RGB_MOD, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_JYEN, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, - KC_LCTL, KC_LWIN, KC_LALT, KC_MHEN, KC_SPC, KC_HENK, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, + KC_LCTL, KC_LWIN, KC_LALT, KC_INT5, KC_SPC, KC_INT4, KC_RALT, KC_RWIN, MO(WIN_FN), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), [WIN_FN] = LAYOUT_jis_92( _______, KC_BRID, KC_BRIU, _______, _______, RGB_VAD, RGB_VAI, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, RGB_TOG, _______, _______, RGB_TOG, diff --git a/keyboards/keychron/q3/q3.c b/keyboards/keychron/q3/q3.c index 5aa6029d69..120013e77e 100644 --- a/keyboards/keychron/q3/q3.c +++ b/keyboards/keychron/q3/q3.c @@ -72,7 +72,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return true; } -__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { return false; } // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); if (host_keyboard_led_state().caps_lock) { @@ -82,6 +83,7 @@ __attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, RGB_MATRIX_INDICATOR_SET_COLOR(CAPS_LOCK_LED_INDEX, 0, 0, 0); } } + return true; } #endif // CAPS_LOCK_LED_INDEX diff --git a/keyboards/keychron/q5/ansi/ansi.c b/keyboards/keychron/q5/ansi/ansi.c index 8efed462f7..6aeb46c07d 100644 --- a/keyboards/keychron/q5/ansi/ansi.c +++ b/keyboards/keychron/q5/ansi/ansi.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q5/ansi/config.h b/keyboards/keychron/q5/ansi/config.h index 55e4ec41ca..9ed58dd522 100644 --- a/keyboards/keychron/q5/ansi/config.h +++ b/keyboards/keychron/q5/ansi/config.h @@ -19,7 +19,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 55 #define DRIVER_2_LED_TOTAL 45 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Enable caps-lock LED */ #define CAPS_LOCK_LED_INDEX 54 diff --git a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c index 1f11ae4143..43c27433b2 100644 --- a/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q5/ansi_encoder/ansi_encoder.c @@ -20,7 +20,7 @@ // clang-format off -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q5/ansi_encoder/config.h b/keyboards/keychron/q5/ansi_encoder/config.h index b96104d0c0..6aecac619e 100644 --- a/keyboards/keychron/q5/ansi_encoder/config.h +++ b/keyboards/keychron/q5/ansi_encoder/config.h @@ -19,7 +19,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 53 #define DRIVER_2_LED_TOTAL 45 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } diff --git a/keyboards/keychron/q5/iso/config.h b/keyboards/keychron/q5/iso/config.h index 751a45711f..df775f11f1 100644 --- a/keyboards/keychron/q5/iso/config.h +++ b/keyboards/keychron/q5/iso/config.h @@ -19,7 +19,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 55 #define DRIVER_2_LED_TOTAL 46 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Enable caps-lock LED */ #define CAPS_LOCK_LED_INDEX 53 diff --git a/keyboards/keychron/q5/iso/iso.c b/keyboards/keychron/q5/iso/iso.c index 221dd7b78a..b57474f535 100644 --- a/keyboards/keychron/q5/iso/iso.c +++ b/keyboards/keychron/q5/iso/iso.c @@ -20,7 +20,7 @@ // clang-format off -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q5/iso_encoder/config.h b/keyboards/keychron/q5/iso_encoder/config.h index 58cda94781..3c9eee8d49 100644 --- a/keyboards/keychron/q5/iso_encoder/config.h +++ b/keyboards/keychron/q5/iso_encoder/config.h @@ -19,7 +19,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 53 #define DRIVER_2_LED_TOTAL 46 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } diff --git a/keyboards/keychron/q5/iso_encoder/iso_encoder.c b/keyboards/keychron/q5/iso_encoder/iso_encoder.c index 75387ad4b6..8ae11bc36b 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 ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q5/q5.c b/keyboards/keychron/q5/q5.c index d1127d1908..f1ccf48214 100644 --- a/keyboards/keychron/q5/q5.c +++ b/keyboards/keychron/q5/q5.c @@ -69,7 +69,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return true; } -__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { return false; } // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); # if defined(CAPS_LOCK_LED_INDEX) if (host_keyboard_led_state().caps_lock) { @@ -89,6 +90,7 @@ __attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, } } # endif // NUM_LOCK_LED_INDEX + return true; } #endif // RGB_MATRIX_ENABLE... diff --git a/keyboards/keychron/q6/ansi/ansi.c b/keyboards/keychron/q6/ansi/ansi.c index dc27c9a82d..982996d347 100644 --- a/keyboards/keychron/q6/ansi/ansi.c +++ b/keyboards/keychron/q6/ansi/ansi.c @@ -20,7 +20,7 @@ // clang-format off -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q6/ansi/config.h b/keyboards/keychron/q6/ansi/config.h index 148f8d4c45..703da35636 100644 --- a/keyboards/keychron/q6/ansi/config.h +++ b/keyboards/keychron/q6/ansi/config.h @@ -27,7 +27,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 60 #define DRIVER_2_LED_TOTAL 48 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Enable caps-lock LED*/ #define CAPS_LOCK_LED_INDEX 61 diff --git a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c index bb1044bd09..6cf593dd25 100644 --- a/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c +++ b/keyboards/keychron/q6/ansi_encoder/ansi_encoder.c @@ -20,7 +20,7 @@ // clang-format off -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q6/ansi_encoder/config.h b/keyboards/keychron/q6/ansi_encoder/config.h index 31d801430f..1949be399b 100644 --- a/keyboards/keychron/q6/ansi_encoder/config.h +++ b/keyboards/keychron/q6/ansi_encoder/config.h @@ -28,7 +28,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 60 #define DRIVER_2_LED_TOTAL 48 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } diff --git a/keyboards/keychron/q6/iso/config.h b/keyboards/keychron/q6/iso/config.h index 3c1164be6d..46c9e1c33a 100644 --- a/keyboards/keychron/q6/iso/config.h +++ b/keyboards/keychron/q6/iso/config.h @@ -27,7 +27,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 60 #define DRIVER_2_LED_TOTAL 49 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Enable caps-lock LED*/ #define CAPS_LOCK_LED_INDEX 60 diff --git a/keyboards/keychron/q6/iso/iso.c b/keyboards/keychron/q6/iso/iso.c index 497efc2d11..d8c4add867 100644 --- a/keyboards/keychron/q6/iso/iso.c +++ b/keyboards/keychron/q6/iso/iso.c @@ -20,7 +20,7 @@ // clang-format off -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q6/iso_encoder/config.h b/keyboards/keychron/q6/iso_encoder/config.h index 442fd35efd..63fe3a83c1 100644 --- a/keyboards/keychron/q6/iso_encoder/config.h +++ b/keyboards/keychron/q6/iso_encoder/config.h @@ -28,7 +28,7 @@ /* RGB Matrix Configuration */ #define DRIVER_1_LED_TOTAL 60 #define DRIVER_2_LED_TOTAL 49 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#define RGB_MATRIX_LED_COUNT (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) /* Encoder Configuration */ #define ENCODERS_PAD_A { C14 } diff --git a/keyboards/keychron/q6/iso_encoder/iso_encoder.c b/keyboards/keychron/q6/iso_encoder/iso_encoder.c index 3ad47b7b0f..c6a21a6223 100644 --- a/keyboards/keychron/q6/iso_encoder/iso_encoder.c +++ b/keyboards/keychron/q6/iso_encoder/iso_encoder.c @@ -20,7 +20,7 @@ // clang-format off -const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL] = { +const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q6/q6.c b/keyboards/keychron/q6/q6.c index 85018004e0..d2f9d2aa4e 100644 --- a/keyboards/keychron/q6/q6.c +++ b/keyboards/keychron/q6/q6.c @@ -67,7 +67,10 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { return true; } -__attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { +bool rgb_matrix_indicators_advanced_kb(uint8_t led_min, uint8_t led_max) { + if (!rgb_matrix_indicators_advanced_user(led_min, led_max)) { + return false; + } // RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue); # if defined(CAPS_LOCK_LED_INDEX) if (host_keyboard_led_state().caps_lock) { @@ -87,6 +90,7 @@ __attribute__((weak)) void rgb_matrix_indicators_advanced_user(uint8_t led_min, } } # endif // NUM_LOCK_LED_INDEX + return true; } #endif // RGB_MATRIX_ENABLE... |