summaryrefslogtreecommitdiff
path: root/keyboards/kbdfans/kbd67
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-10-04 15:24:22 -0700
committerGitHub <noreply@github.com>2022-10-04 15:24:22 -0700
commit64b1ed45507a15d5594b1f90b936c2096918f5a4 (patch)
tree8824b1d4f55797d7608d3111a2755e919040e834 /keyboards/kbdfans/kbd67
parent09d3e2771099ff1ca7e7bd8882644eb2b2807763 (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/kbdfans/kbd67')
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c3
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c10
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c6
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c7
-rwxr-xr-xkeyboards/kbdfans/kbd67/mkiirgb/v3/v3.c7
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c15
-rw-r--r--keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c12
7 files changed, 35 insertions, 25 deletions
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c
index be5f251dac..d34ed320dd 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/dnsnrk/keymap.c
@@ -51,7 +51,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}
-void rgb_matrix_indicators_user(void) {
+bool rgb_matrix_indicators_user(void) {
if (rgb_matrix_config.enable) {
HSV hsv = rgb_matrix_config.hsv;
if (IS_HOST_LED_ON(USB_LED_CAPS_LOCK)) {
@@ -87,6 +87,7 @@ void rgb_matrix_indicators_user(void) {
set_hsv_at(hsv1, 63);
set_hsv_at(hsv2, 57);
}
+ return false;
}
void set_hsv_at(HSV hsv, uint8_t index) {
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c
index c2e409ed35..4adebffccf 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/keymaps/jonavin/keymap.c
@@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
#ifdef RGB_MATRIX_ENABLE
// Capslock, Scroll lock and Numlock indicator
- 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 (get_rgb_nightmode()) rgb_matrix_set_color_all(RGB_OFF);
if (IS_HOST_LED_ON(USB_LED_SCROLL_LOCK)) {
rgb_matrix_set_color(LED_I, RGB_GREEN);
@@ -109,15 +109,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
default:
break;
}
+ return false;
}
- void suspend_power_down_user(void) {
- rgb_matrix_set_suspend_state(true);
- }
-
- void suspend_wakeup_init_user(void) {
- rgb_matrix_set_suspend_state(false);
- }
#endif
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c
index f034350b7c..594d1fee23 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c
@@ -96,9 +96,13 @@ led_config_t g_led_config = {{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}
{{0, 0}, {15, 0}, {30, 0}, {45, 0}, {60, 0}, {75, 0}, {90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {203, 0}, {224, 0}, {4, 16}, {23, 16}, {38, 16}, {53, 16}, {68, 16}, {83, 16}, {98, 16}, {113, 16}, {128, 16}, {143, 16}, {158, 16}, {173, 16}, {188, 16}, {206, 16}, {224, 16}, {6, 32}, {26, 32}, {41, 32}, {56, 32}, {71, 32}, {86, 32}, {101, 32}, {116, 32}, {131, 32}, {146, 32}, {161, 32}, {176, 32}, {201, 32}, {224, 32}, {9, 48}, {34, 48}, {49, 48}, {64, 48}, {79, 48}, {94, 48}, {109, 48}, {124, 48}, {139, 48}, {154, 48}, {169, 48}, {189, 48}, {210, 48}, {224, 48}, {2, 64}, {21, 64}, {39, 64}, {96, 64}, {152, 64}, {171, 64}, {195, 64}, {210, 64}, {224, 64}},
{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}};
-__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/kbdfans/kbd67/mkiirgb/v2/v2.c b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c
index 1da1c66747..9bfcb47d96 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c
@@ -113,10 +113,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/kbdfans/kbd67/mkiirgb/v3/v3.c b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c
index 8089ee1f8c..542551b3a3 100755
--- a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c
@@ -137,8 +137,10 @@ led_config_t g_led_config = { {
#define CAPS_LOCK_VAL_STEP 8
#endif
-__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) {
uint8_t b = rgb_matrix_get_val();
if (b < CAPS_LOCK_VAL_STEP) {
@@ -150,6 +152,7 @@ void rgb_matrix_indicators_user(void) {
}
rgb_matrix_set_color(CAPS_LOCK_LED_INDEX, b, b, b); // white, with the adjusted brightness
}
+ return true;
}
#endif
diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c b/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c
index 3c4b81132f..c39d01f3b9 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb/v4/v4.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 "v4.h"
#ifdef RGB_MATRIX_ENABLE
@@ -29,21 +29,24 @@ led_config_t g_led_config = {
{0,0},{15,0},{30,0},{45,0},{60,0},{75,0},{90,0},{105,0},{120,0},{135,0},{150,0},{165,0},{180,0},{203,0},{224,0},
{224,16},{206,16},{188,16},{173,16},{158,16},{143,16},{128,16},{113,16},{98,16},{83,16}, {68,16},{53,16},{38,16},{23,16},{4,16},
{6,32},{26,32},{41,32},{56,32},{71,32},{86,32},{101,32},{116,32},{131,32},{146,32},{161,32},{176,32},{201,32},{224,32},
- {224,48},{210,48},{189,48},{169,48},{154,48},{139,48},{124,48},{109,48},{94,48},{79,48},{64,48},{49,48},{34,48},{9,48},
+ {224,48},{210,48},{189,48},{169,48},{154,48},{139,48},{124,48},{109,48},{94,48},{79,48},{64,48},{49,48},{34,48},{9,48},
{2,64},{21,64},{39,64},{96,64},{152,64},{171,64},{195,64},{210,64},{224,64}
}, {
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, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
+ 1, 1, 1, 4, 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
diff --git a/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c b/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c
index 267fa57598..37c2bcae45 100644
--- a/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c
+++ b/keyboards/kbdfans/kbd67/mkiirgb_iso/mkiirgb_iso.c
@@ -33,17 +33,19 @@ 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, 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, 4, 1,
- 1, 1, 1, 4, 1, 1, 1, 1, 1
+ 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
+ 1, 1, 1, 4, 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(29, 0xFF, 0xFF, 0xFF);
}
+ return true;
}
#endif
-