summaryrefslogtreecommitdiffstats
path: root/layouts/community/ortho_4x12
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2023-07-06 18:48:02 +1000
committerGitHub <noreply@github.com>2023-07-06 09:48:02 +0100
commit87b11345a55d076966846d87b60d0f315b8bb984 (patch)
treea64503358d5f30b55a722b882eebaf1b60b03e1f /layouts/community/ortho_4x12
parent928e03e8d669cb35a96c2aa4a09012c527b27892 (diff)
Get rid of `USB_LED_CAPS_LOCK` (#21436)
Diffstat (limited to 'layouts/community/ortho_4x12')
-rw-r--r--layouts/community/ortho_4x12/brandonschlack/keymap.c5
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/layouts/community/ortho_4x12/brandonschlack/keymap.c b/layouts/community/ortho_4x12/brandonschlack/keymap.c
index 7361de1a03..04c83de9e9 100644
--- a/layouts/community/ortho_4x12/brandonschlack/keymap.c
+++ b/layouts/community/ortho_4x12/brandonschlack/keymap.c
@@ -100,12 +100,13 @@ void keyboard_post_init_keymap(void) {
}
// Use Green LED for Caps Lock
-void led_set_user(uint8_t usb_led) {
- if (IS_LED_OFF(usb_led, USB_LED_CAPS_LOCK)) {
+bool led_update_user(led_t led_state) {
+ if (led_state.caps_lock) {
writePinLow(LED_GREEN);
} else {
writePinHigh(LED_GREEN);
}
+ return false;
}
#endif
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index 475ccc5c3a..cdf41fc5dc 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -184,7 +184,7 @@ led_config_t g_led_config = {
bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) {
uint8_t this_mod = get_mods();
- uint8_t this_led = host_keyboard_leds();
+ led_t this_led = host_keyboard_led_state();
uint8_t this_osm = get_oneshot_mods();
# ifdef KEYBOARD_planck_ez
# define THUMB_LED 41
@@ -208,7 +208,7 @@ bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) {
break;
}
- if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) {
+ if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led.caps_lock) {
if (!layer_state_cmp(layer_state, _ADJUST)) {
RGB_MATRIX_INDICATOR_SET_COLOR(24, 0x00, 0xFF, 0x00);
}