summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron/q1/rev_0100/keymaps
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/keychron/q1/rev_0100/keymaps
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/keychron/q1/rev_0100/keymaps')
-rw-r--r--keyboards/keychron/q1/rev_0100/keymaps/gtg465x/rgb_matrix_user.c3
-rw-r--r--keyboards/keychron/q1/rev_0100/keymaps/mkillewald/rgb_matrix_user.c9
-rw-r--r--keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c3
3 files changed, 9 insertions, 6 deletions
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 f5e8d48cba..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
@@ -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 90e16ded46..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
@@ -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/rgb_matrix_user.c b/keyboards/keychron/q1/rev_0100/keymaps/teimor/rgb_matrix_user.c
index 6750dc86c7..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
@@ -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) {