qmk_firmware/keyboards/framework/numpad/numpad.c
Daniel Schaefer 0bb3443cb5 fl16: Sync numlock with numlock layers
Otherwise we might get stuck in numlock disabled state and wouldn't be
able to type numbers anymore or get out of the mode.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
2023-07-13 23:36:29 +08:00

15 lines
329 B
C

// Copyright 2023 Framework Computer
// SPDX-License-Identifier: GPL-2.0-or-later
#include "quantum.h"
#include "numpad.h"
void keyboard_post_init_user(void) {
// Sync initial numlock state from the host
if (host_keyboard_led_state().num_lock) {
layer_on(_NUMLOCK);
} else {
layer_off(_FN);
}
}