diff options
author | Drashna Jaelre <drashna@live.com> | 2022-10-04 15:24:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 15:24:22 -0700 |
commit | 64b1ed45507a15d5594b1f90b936c2096918f5a4 (patch) | |
tree | 8824b1d4f55797d7608d3111a2755e919040e834 /keyboards/dztech | |
parent | 09d3e2771099ff1ca7e7bd8882644eb2b2807763 (diff) |
Fix Per Key LED Indicator Callbacks (#18450)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'keyboards/dztech')
18 files changed, 127 insertions, 157 deletions
diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index 0a7a2adfc6..cfefd2833d 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -93,20 +93,13 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c index 287496e17f..3552864e8c 100644 --- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/keymap.c @@ -91,8 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ }; -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { uint8_t this_led = host_keyboard_leds(); if (!g_suspend_state && rgb_matrix_config.enable) { @@ -218,6 +217,7 @@ void rgb_matrix_indicators_user(void) if (this_led & (1 << USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } + return false; } void matrix_init_user(void) diff --git a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c index d2905af49f..efed4494ef 100644 --- a/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/mekanist/keymap.c @@ -57,8 +57,7 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { } } -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { uint8_t this_led = host_keyboard_leds(); if (!g_suspend_state && rgb_matrix_config.enable) { @@ -151,6 +150,7 @@ void rgb_matrix_indicators_user(void) rgb_matrix_set_color(62, 0x00, 0x00, 0x00); break; } + return false; } diff --git a/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c b/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c index 191789199a..841617e2c9 100644 --- a/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/perseid/keymap.c @@ -34,8 +34,7 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) { } } -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { if (!g_suspend_state) { switch (get_highest_layer(layer_state)) { case _QWERTY: @@ -113,6 +112,7 @@ void rgb_matrix_indicators_user(void) rgb_matrix_set_color(62, 0x00, 0x00, 0x00); break; } + return false; } diff --git a/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c b/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c index b6644ed14b..4b4a4e2877 100644 --- a/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/piv3rt/keymap.c @@ -157,7 +157,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; }; -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) { led_t led_state = host_keyboard_led_state(); if (led_state.caps_lock) { @@ -227,4 +227,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR(25, 0x33, 0x66, 0x99); RGB_MATRIX_INDICATOR_SET_COLOR(26, 0x33, 0x66, 0x99); } + return false; } diff --git a/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c b/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c index 1de0d2632d..25b6e4f472 100644 --- a/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c +++ b/keyboards/dztech/dz60rgb/keymaps/xunz/keymap.c @@ -4,34 +4,19 @@ #define _LAYER2 2 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_LAYER0] = LAYOUT(KC_GESC, 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, - 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_BSLS, - 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_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2,KC_DEL), + [_LAYER0] = LAYOUT(KC_GESC, 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, + 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_BSLS, + 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2,KC_DEL), KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), [_LAYER1] = LAYOUT(KC_TRNS, 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, - KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, QK_BOOT, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, EEP_RST, + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, QK_BOOT, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, EEP_RST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), - [_LAYER2] = LAYOUT(KC_TRNS, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_DEL, - KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_PSLS, KC_PAST, QK_BOOT, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, EEP_RST, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, + [_LAYER2] = LAYOUT(KC_TRNS, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_DEL, + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_PSLS, KC_PAST, QK_BOOT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, EEP_RST, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; - -void rgb_matrix_indicators_user(void) { -} - -void matrix_init_user(void) { - //user initialization -} - -void matrix_scan_user(void) { - //user matrix -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; - } diff --git a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c index ea4fa429ac..475c9cc4b5 100644 --- a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c +++ b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c @@ -91,20 +91,13 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c b/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c index 20eaed8247..7c6dd50447 100644 --- a/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c +++ b/keyboards/dztech/dz60rgb_ansi/keymaps/kuru/keymap.c @@ -84,7 +84,7 @@ void highlight_layer3(void){ rgb_matrix_set_color(46, 0x00, 0x99, 0x00); } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { uint8_t this_led = host_keyboard_leds(); if (!g_suspend_state) { switch (get_highest_layer(layer_state)) { @@ -97,4 +97,5 @@ void rgb_matrix_indicators_user(void) { if ( this_led & (1<<USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } + return false; } diff --git a/keyboards/dztech/dz60rgb_ansi/keymaps/muralisc/keymap.c b/keyboards/dztech/dz60rgb_ansi/keymaps/muralisc/keymap.c index 239e4ea8ba..2c0300fe52 100644 --- a/keyboards/dztech/dz60rgb_ansi/keymaps/muralisc/keymap.c +++ b/keyboards/dztech/dz60rgb_ansi/keymaps/muralisc/keymap.c @@ -145,7 +145,7 @@ void highlight_layer3(void) { } } -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { uint8_t this_led = host_keyboard_leds(); if (!g_suspend_state) { switch (get_highest_layer(layer_state)) { @@ -164,5 +164,5 @@ void rgb_matrix_indicators_user(void) { if ( this_led & (1<<USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } - + return false; } diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c index 53d0e9fa14..5ee8d1b531 100644 --- a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c +++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c @@ -92,20 +92,13 @@ led_config_t g_led_config = { } }; -void suspend_power_down_kb(void) { - rgb_matrix_set_suspend_state(true); - suspend_power_down_user(); -} - -void suspend_wakeup_init_kb(void) { - rgb_matrix_set_suspend_state(false); - suspend_wakeup_init_user(); -} - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(41, 0xFF, 0xFF, 0xFF); } + return false; } #endif diff --git a/keyboards/dztech/dz64rgb/dz64rgb.c b/keyboards/dztech/dz64rgb/dz64rgb.c index e6b218fea6..4173abf542 100644 --- a/keyboards/dztech/dz64rgb/dz64rgb.c +++ b/keyboards/dztech/dz64rgb/dz64rgb.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ - + #include "dz64rgb.h" #ifdef RGB_MATRIX_ENABLE @@ -64,7 +64,7 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { { 0, B_14, A_14, C_14 }, { 0, B_13, A_13, C_13 }, - { 0, B_12, A_12, C_12 }, + { 0, B_12, A_12, C_12 }, { 0, B_11, A_11, C_11 }, { 0, B_10, A_10, C_10 }, { 0, B_9, A_9, C_9 }, @@ -111,11 +111,13 @@ led_config_t g_led_config = { }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); } + return true; } #endif - diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c index b85b582b39..2b45528208 100644 --- a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/keymap.c @@ -230,7 +230,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { // CapsLock Light if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { @@ -239,4 +239,5 @@ void rgb_matrix_indicators_user(void) { // Show Selected Layer rgb_matrix_set_color(layers_leds_map[get_highest_layer(layer_state)], MAIN_COLOR[0], MAIN_COLOR[1], MAIN_COLOR[2]); + return false; } diff --git a/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c b/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c index 2ebbddcef7..8b9002f521 100644 --- a/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/drootz/keymap.c @@ -134,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //**************** MATRIX SCANS *********************// -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_user(void) { #ifdef RGB_MATRIX_ENABLE @@ -192,6 +192,7 @@ void rgb_matrix_indicators_user(void) { } #endif /* RGB_MATRIX */ + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c index 0c7bfbbb48..c6d42c777e 100644 --- a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/keymap.c @@ -82,8 +82,7 @@ CPS, A, S, D, F, G, H, J, K, L, COL, QOT, RETURN, + SFT, Z, X, C, V, B, N, M, COM, DOT, SLS, SHIFT, UP, 0 CTL, GUI, ALT, SPACEBAR, ALT, FN, CTL, LFT, DWN, RIT */ -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_user(void) { if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) { rgb_matrix_set_color(8, 0xFF, 0xFF, 0xFF); } @@ -208,16 +207,7 @@ void rgb_matrix_indicators_user(void) break; } } -} - -void matrix_init_user(void) -{ - //user initialization -} - -void matrix_scan_user(void) -{ - //user matrix + return false; } bool process_record_user(uint16_t keycode, keyrecord_t* record) diff --git a/keyboards/dztech/dz65rgb/keymaps/yuannan/keymap.c b/keyboards/dztech/dz65rgb/keymaps/yuannan/keymap.c index 5baf32a7e4..61cb875b8a 100644 --- a/keyboards/dztech/dz65rgb/keymaps/yuannan/keymap.c +++ b/keyboards/dztech/dz65rgb/keymaps/yuannan/keymap.c @@ -1,17 +1,17 @@ /* Copyright 2021 Yuannan (https://github.com/yuannan) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include QMK_KEYBOARD_H @@ -169,7 +169,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record){ } } break; - } + } return true; }; @@ -179,20 +179,21 @@ RGB get_inverted_RGB(void){ current_HSV.h = 255 - current_HSV.h; current_HSV.s = 255; current_HSV.v = 255; - + return hsv_to_rgb(current_HSV); } // Move Caps indicator to the ctrl key where it belongs -void rgb_matrix_indicators_user(void){ +bool rgb_matrix_indicators_user(void){ RGB inverted_RGB = get_inverted_RGB(); if (host_keyboard_led_state().caps_lock){ rgb_matrix_set_color(58, inverted_RGB.r, inverted_RGB.g, inverted_RGB.b); } + return false; } // show coloured indicator for layers with a keybind -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 layer = get_highest_layer(layer_state); if (layer > 0) { RGB inverted_RGB = get_inverted_RGB(); @@ -207,4 +208,5 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max){ } } } + return false; } diff --git a/keyboards/dztech/dz65rgb/v1/v1.c b/keyboards/dztech/dz65rgb/v1/v1.c index e0f12bb6cd..0e52a3f911 100644 --- a/keyboards/dztech/dz65rgb/v1/v1.c +++ b/keyboards/dztech/dz65rgb/v1/v1.c @@ -114,10 +114,13 @@ led_config_t g_led_config = { }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/dztech/dz65rgb/v2/v2.c b/keyboards/dztech/dz65rgb/v2/v2.c index f9833b2142..43629e74da 100644 --- a/keyboards/dztech/dz65rgb/v2/v2.c +++ b/keyboards/dztech/dz65rgb/v2/v2.c @@ -114,10 +114,13 @@ led_config_t g_led_config = { }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif diff --git a/keyboards/dztech/dz65rgb/v3/v3.c b/keyboards/dztech/dz65rgb/v3/v3.c index c3562c7c5d..45cc5cb3bd 100755 --- a/keyboards/dztech/dz65rgb/v3/v3.c +++ b/keyboards/dztech/dz65rgb/v3/v3.c @@ -21,77 +21,77 @@ const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT] = { {0, CS21_SW1, CS20_SW1, CS19_SW1}, {0, CS21_SW2, CS20_SW2, CS19_SW2}, - {0, CS21_SW3, CS20_SW3, CS19_SW3}, - {0, CS21_SW4, CS20_SW4, CS19_SW4}, + {0, CS21_SW3, CS20_SW3, CS19_SW3}, + {0, CS21_SW4, CS20_SW4, CS19_SW4}, {0, CS21_SW5, CS20_SW5, CS19_SW5}, {0, CS21_SW6, CS20_SW6, CS19_SW6}, - {0, CS21_SW7, CS20_SW7, CS19_SW7}, - {0, CS21_SW8, CS20_SW8, CS19_SW8}, - {0, CS24_SW1, CS23_SW1, CS22_SW1}, - {0, CS24_SW2, CS23_SW2, CS22_SW2}, + {0, CS21_SW7, CS20_SW7, CS19_SW7}, + {0, CS21_SW8, CS20_SW8, CS19_SW8}, + {0, CS24_SW1, CS23_SW1, CS22_SW1}, + {0, CS24_SW2, CS23_SW2, CS22_SW2}, {0, CS24_SW3, CS23_SW3, CS22_SW3}, - {0, CS24_SW4, CS23_SW4, CS22_SW4}, + {0, CS24_SW4, CS23_SW4, CS22_SW4}, {0, CS24_SW5, CS23_SW5, CS22_SW5}, {0, CS24_SW6, CS23_SW6, CS22_SW6}, - {0, CS24_SW7, CS23_SW7, CS22_SW7}, - - {0, CS15_SW1, CS14_SW1, CS13_SW1}, + {0, CS24_SW7, CS23_SW7, CS22_SW7}, + + {0, CS15_SW1, CS14_SW1, CS13_SW1}, {0, CS15_SW2, CS14_SW2, CS13_SW2}, {0, CS15_SW3, CS14_SW3, CS13_SW3}, {0, CS15_SW4, CS14_SW4, CS13_SW4}, {0, CS15_SW5, CS14_SW5, CS13_SW5}, {0, CS15_SW6, CS14_SW6, CS13_SW6}, {0, CS15_SW7, CS14_SW7, CS13_SW7}, - {0, CS15_SW8, CS14_SW8, CS13_SW8}, - {0, CS30_SW1, CS29_SW1, CS28_SW1}, + {0, CS15_SW8, CS14_SW8, CS13_SW8}, + {0, CS30_SW1, CS29_SW1, CS28_SW1}, {0, CS30_SW2, CS29_SW2, CS28_SW2}, {0, CS30_SW3, CS29_SW3, CS28_SW3}, {0, CS30_SW4, CS29_SW4, CS28_SW4}, {0, CS30_SW5, CS29_SW5, CS28_SW5}, {0, CS30_SW6, CS29_SW6, CS28_SW6}, - {0, CS30_SW7, CS29_SW7, CS28_SW7}, - - {0, CS12_SW1, CS11_SW1, CS10_SW1}, - {0, CS12_SW2, CS11_SW2, CS10_SW2}, - {0, CS12_SW3, CS11_SW3, CS10_SW3}, - {0, CS12_SW4, CS11_SW4, CS10_SW4}, - {0, CS12_SW5, CS11_SW5, CS10_SW5}, - {0, CS12_SW6, CS11_SW6, CS10_SW6}, - {0, CS12_SW7, CS11_SW7, CS10_SW7}, - {0, CS12_SW8, CS11_SW8, CS10_SW8}, - {0, CS33_SW1, CS32_SW1, CS31_SW1}, - {0, CS33_SW2, CS32_SW2, CS31_SW2}, - {0, CS33_SW3, CS32_SW3, CS31_SW3}, - {0, CS33_SW4, CS32_SW4, CS31_SW4}, - {0, CS33_SW5, CS32_SW5, CS31_SW5}, - {0, CS33_SW7, CS32_SW7, CS31_SW7}, - - {0, CS9_SW1, CS8_SW1, CS7_SW1}, - {0, CS9_SW2, CS8_SW2, CS7_SW2}, - {0, CS9_SW3, CS8_SW3, CS7_SW3}, - {0, CS9_SW4, CS8_SW4, CS7_SW4}, - {0, CS9_SW5, CS8_SW5, CS7_SW5}, - {0, CS9_SW6, CS8_SW6, CS7_SW6}, - {0, CS9_SW7, CS8_SW7, CS7_SW7}, - {0, CS9_SW8, CS8_SW8, CS7_SW8}, + {0, CS30_SW7, CS29_SW7, CS28_SW7}, + + {0, CS12_SW1, CS11_SW1, CS10_SW1}, + {0, CS12_SW2, CS11_SW2, CS10_SW2}, + {0, CS12_SW3, CS11_SW3, CS10_SW3}, + {0, CS12_SW4, CS11_SW4, CS10_SW4}, + {0, CS12_SW5, CS11_SW5, CS10_SW5}, + {0, CS12_SW6, CS11_SW6, CS10_SW6}, + {0, CS12_SW7, CS11_SW7, CS10_SW7}, + {0, CS12_SW8, CS11_SW8, CS10_SW8}, + {0, CS33_SW1, CS32_SW1, CS31_SW1}, + {0, CS33_SW2, CS32_SW2, CS31_SW2}, + {0, CS33_SW3, CS32_SW3, CS31_SW3}, + {0, CS33_SW4, CS32_SW4, CS31_SW4}, + {0, CS33_SW5, CS32_SW5, CS31_SW5}, + {0, CS33_SW7, CS32_SW7, CS31_SW7}, + + {0, CS9_SW1, CS8_SW1, CS7_SW1}, + {0, CS9_SW2, CS8_SW2, CS7_SW2}, + {0, CS9_SW3, CS8_SW3, CS7_SW3}, + {0, CS9_SW4, CS8_SW4, CS7_SW4}, + {0, CS9_SW5, CS8_SW5, CS7_SW5}, + {0, CS9_SW6, CS8_SW6, CS7_SW6}, + {0, CS9_SW7, CS8_SW7, CS7_SW7}, + {0, CS9_SW8, CS8_SW8, CS7_SW8}, {0, CS36_SW1, CS35_SW1, CS34_SW1}, {0, CS36_SW2, CS35_SW2, CS34_SW2}, {0, CS36_SW3, CS35_SW3, CS34_SW3}, {0, CS36_SW4, CS35_SW4, CS34_SW4}, {0, CS36_SW5, CS35_SW5, CS34_SW5}, {0, CS36_SW7, CS35_SW7, CS34_SW7}, - + {0, CS3_SW1, CS2_SW1, CS1_SW1}, {0, CS3_SW2, CS2_SW2, CS1_SW2}, {0, CS3_SW3, CS2_SW3, CS1_SW3}, {0, CS3_SW6, CS2_SW6, CS1_SW6}, - {0, CS39_SW1, CS38_SW1, CS37_SW1}, + {0, CS39_SW1, CS38_SW1, CS37_SW1}, {0, CS39_SW2, CS38_SW2, CS37_SW2}, {0, CS39_SW3, CS38_SW3, CS37_SW3}, {0, CS39_SW4, CS38_SW4, CS37_SW4}, {0, CS39_SW5, CS38_SW5, CS37_SW5}, - {0, CS39_SW7, CS38_SW7, CS37_SW7} - + {0, CS39_SW7, CS38_SW7, CS37_SW7} + }; led_config_t g_led_config = { { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, @@ -108,18 +108,20 @@ led_config_t g_led_config = { { }, { 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1 } }; -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) -{ +bool rgb_matrix_indicators_kb(void) { + if (!rgb_matrix_indicators_user()) { + return false; + } if (host_keyboard_led_state().caps_lock) { rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); } + return true; } #endif |