summaryrefslogtreecommitdiff
path: root/users/konstantin/konstantin.c
diff options
context:
space:
mode:
authorKonstantin Đorđević <vomindoraan@gmail.com>2019-01-27 17:46:54 +0100
committerDrashna Jaelre <drashna@live.com>2019-01-27 08:46:54 -0800
commit6ba0b818e9ab8830610ab2a74515227884f93abc (patch)
treeb6a8761351604b6fe222b0e0196d24c447d4db97 /users/konstantin/konstantin.c
parent5c1d4baec4a178df3845c724ec48f8e9bba47b74 (diff)
[Keymap] Update personal userspace and keymaps (#4963)
* Remove duplicated or unnecessary definitions in config.h and rules.mk * Use IS_HOST_LED_ON() macro * Add mouse acceleration to kbd6x:konstantin keymap * Clear and restore mods when sending macros * Make SEND_STRING_CLEAN a config option * Add NO_ACTION_ONESHOT to userspace config
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 977111c1f9..47596279c3 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
}
}