diff options
author | Priyadi Iman Nurcahyo <priyadi@priyadi.net> | 2017-02-11 16:07:04 +0100 |
---|---|---|
committer | Priyadi Iman Nurcahyo <priyadi@priyadi.net> | 2017-02-11 16:07:04 +0100 |
commit | 4586b19be3058822474ba0b8035cc867a41154f9 (patch) | |
tree | e11a51b52b6b493eb4223d38504f0fec78b54b6a | |
parent | c6123b2e4a8472557c3a563d69662840dc3d0720 (diff) | |
download | qmk_firmware-4586b19be3058822474ba0b8035cc867a41154f9.tar.gz qmk_firmware-4586b19be3058822474ba0b8035cc867a41154f9.tar.xz |
Turn off capslock when entering num layer
-rw-r--r-- | keyboards/handwired/promethium/keymaps/priyadi/keymap.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index bfca58e37..8c24f381f 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -996,6 +996,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case NUM: if (record->event.pressed) { + turn_off_capslock(); layer_on(_NUM); } else { layer_off(_NUM); @@ -1096,6 +1097,13 @@ void led_set_user(uint8_t usb_led) { } } +void turn_off_capslock() { + if (capslock) { + register_code(KC_CAPS); + unregister_code(KC_CAPS); + } +} + void ps2_mouse_init_user() { uint8_t rcv; |