|
|
@ -40,22 +40,21 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
|
|
|
|
if (!process_record_keymap(keycode, record)) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef LAYER_NUMPAD
|
|
|
|
#ifdef LAYER_NUMPAD
|
|
|
|
static void toggle_numpad(void) {
|
|
|
|
void toggle_numpad(void) {
|
|
|
|
layer_invert(L_NUMPAD);
|
|
|
|
layer_invert(L_NUMPAD);
|
|
|
|
bool numpad_on = IS_LAYER_ON(L_NUMPAD);
|
|
|
|
bool numpad = IS_LAYER_ON(L_NUMPAD), num_lock = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
|
|
|
|
bool num_lock_on = IS_HOST_LED_ON(USB_LED_NUM_LOCK);
|
|
|
|
if (num_lock != numpad) {
|
|
|
|
if (num_lock_on != numpad_on) {
|
|
|
|
|
|
|
|
tap_code(KC_NLCK); // Toggle Num Lock to match layer state
|
|
|
|
tap_code(KC_NLCK); // Toggle Num Lock to match layer state
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
|
|
|
|
if (!process_record_keymap(keycode, record)) {
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch (keycode) {
|
|
|
|
switch (keycode) {
|
|
|
|
case CLEAR:
|
|
|
|
case CLEAR:
|
|
|
|
if (record->event.pressed) {
|
|
|
|
if (record->event.pressed) {
|
|
|
|