diff options
Diffstat (limited to 'keyboards/keychron/q2')
-rw-r--r-- | keyboards/keychron/q2/config.h | 5 | ||||
-rw-r--r-- | keyboards/keychron/q2/rev_0110/config.h | 2 | ||||
-rw-r--r-- | keyboards/keychron/q2/rev_0110/keymaps/ladduro/rgb_matrix_user.c | 7 | ||||
-rw-r--r-- | keyboards/keychron/q2/rev_0110/rev_0110.c | 2 | ||||
-rw-r--r-- | keyboards/keychron/q2/rev_0111/config.h | 2 | ||||
-rw-r--r-- | keyboards/keychron/q2/rev_0111/rev_0111.c | 2 | ||||
-rw-r--r-- | keyboards/keychron/q2/rev_0112/config.h | 2 | ||||
-rw-r--r-- | keyboards/keychron/q2/rev_0112/rev_0112.c | 2 | ||||
-rw-r--r-- | keyboards/keychron/q2/rev_0113/config.h | 2 | ||||
-rw-r--r-- | keyboards/keychron/q2/rev_0113/keymaps/dhertz/keymap.c | 7 | ||||
-rw-r--r-- | keyboards/keychron/q2/rev_0113/rev_0113.c | 2 |
11 files changed, 16 insertions, 19 deletions
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 |