diff options
Diffstat (limited to 'users/konstantin/konstantin.c')
-rw-r--r-- | users/konstantin/konstantin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c index 977111c1f..47596279c 100644 --- a/users/konstantin/konstantin.c +++ b/users/konstantin/konstantin.c @@ -3,8 +3,9 @@ #ifdef LAYER_NUMPAD static void toggle_numpad(void) { layer_invert(L_NUMPAD); - bool num_lock = host_keyboard_leds() & 1<<USB_LED_NUM_LOCK; - if (num_lock != (bool)IS_LAYER_ON(L_NUMPAD)) { + bool numpad_on = IS_LAYER_ON(L_NUMPAD); + bool num_lock_on = IS_HOST_LED_ON(USB_LED_NUM_LOCK); + if (num_lock_on != numpad_on) { tap_code(KC_NLCK); // Toggle Num Lock to match layer state } } |