aboutsummaryrefslogtreecommitdiff
path: root/users/konstantin/konstantin.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/konstantin/konstantin.c')
-rw-r--r--users/konstantin/konstantin.c5
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 @@
3#ifdef LAYER_NUMPAD 3#ifdef LAYER_NUMPAD
4static void toggle_numpad(void) { 4static void toggle_numpad(void) {
5 layer_invert(L_NUMPAD); 5 layer_invert(L_NUMPAD);
6 bool num_lock = host_keyboard_leds() & 1<<USB_LED_NUM_LOCK; 6 bool numpad_on = IS_LAYER_ON(L_NUMPAD);
7 if (num_lock != (bool)IS_LAYER_ON(L_NUMPAD)) { 7 bool num_lock_on = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
8 if (num_lock_on != numpad_on) {
8 tap_code(KC_NLCK); // Toggle Num Lock to match layer state 9 tap_code(KC_NLCK); // Toggle Num Lock to match layer state
9 } 10 }
10} 11}