mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 11:29:26 +00:00
Turn off capslock when entering num layer
This commit is contained in:
parent
c6123b2e4a
commit
4586b19be3
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user