1 #include "konstantin.h"
4 static void toggle_numpad(void) {
5 layer_invert(L_NUMPAD
);
6 bool numpad_on
= 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
) {
9 tap_code(KC_NLCK
); // Toggle Num Lock to match layer state
15 bool process_record_keymap(uint16_t keycode
, keyrecord_t
*record
) {
19 bool process_record_user(uint16_t keycode
, keyrecord_t
*record
) {
20 if (!process_record_keymap(keycode
, record
)) {
26 if (record
->event
.pressed
) {
27 SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE
));
35 if (record
->event
.pressed
&& record
->tap
.count
== TAPPING_TOGGLE
) {
36 fn_lock
= !IS_LAYER_ON(L_FN
); // Fn layer will be toggled after this
43 if (record
->event
.pressed
) {
50 if (record
->event
.pressed
) {
52 if (IS_LAYER_ON(L_NUMPAD
)) {
58 if (IS_LAYER_ON(L_FN
) && fn_lock
) {
60 return fn_lock
= false;
72 uint32_t layer_state_set_keymap(uint32_t state
) {
76 uint32_t layer_state_set_user(uint32_t state
) {
77 return layer_state_set_keymap(state
);