break;
#ifndef NO_ACTION_TAPPING
case ACT_LAYER_TAP:
- case ACT_LAYER_TAP1:
+ case ACT_LAYER_TAP_EXT:
switch (action.layer_tap.code) {
case OP_TAP_TOGGLE:
/* tap toggle */
if (code == KC_NO) {
return;
}
-#ifdef CAPSLOCK_LOCKING_ENABLE
+
+#ifdef LOCKING_SUPPORT_ENABLE
else if (KC_LOCKING_CAPS == code) {
-#ifdef CAPSLOCK_LOCKING_RESYNC_ENABLE
+#ifdef LOCKING_RESYNC_ENABLE
// Resync: ignore if caps lock already is on
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) return;
#endif
host_del_key(KC_CAPSLOCK);
host_send_keyboard_report();
}
+
+ else if (KC_LOCKING_NUM == code) {
+#ifdef LOCKING_RESYNC_ENABLE
+ if (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) return;
+#endif
+ host_add_key(KC_NUMLOCK);
+ host_send_keyboard_report();
+ host_del_key(KC_NUMLOCK);
+ host_send_keyboard_report();
+ }
+
+ else if (KC_LOCKING_SCROLL == code) {
+#ifdef LOCKING_RESYNC_ENABLE
+ if (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) return;
+#endif
+ host_add_key(KC_SCROLLLOCK);
+ host_send_keyboard_report();
+ host_del_key(KC_SCROLLLOCK);
+ host_send_keyboard_report();
+ }
#endif
+
else if IS_KEY(code) {
// TODO: should push command_proc out of this block?
if (command_proc(code)) return;
host_add_mods(MOD_BIT(code));
host_send_keyboard_report();
}
+ else if IS_SYSTEM(code) {
+ host_system_send(KEYCODE2SYSTEM(code));
+ }
+ else if IS_CONSUMER(code) {
+ host_consumer_send(KEYCODE2CONSUMER(code));
+ }
}
void unregister_code(uint8_t code)
if (code == KC_NO) {
return;
}
-#ifdef CAPSLOCK_LOCKING_ENABLE
+
+#ifdef LOCKING_SUPPORT_ENABLE
else if (KC_LOCKING_CAPS == code) {
-#ifdef CAPSLOCK_LOCKING_RESYNC_ENABLE
+#ifdef LOCKING_RESYNC_ENABLE
// Resync: ignore if caps lock already is off
if (!(host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK))) return;
#endif
host_del_key(KC_CAPSLOCK);
host_send_keyboard_report();
}
+
+ else if (KC_LOCKING_NUM == code) {
+#ifdef LOCKING_RESYNC_ENABLE
+ if (!(host_keyboard_leds() & (1<<USB_LED_NUM_LOCK))) return;
+#endif
+ host_add_key(KC_NUMLOCK);
+ host_send_keyboard_report();
+ host_del_key(KC_NUMLOCK);
+ host_send_keyboard_report();
+ }
+
+ else if (KC_LOCKING_SCROLL == code) {
+#ifdef LOCKING_RESYNC_ENABLE
+ if (!(host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK))) return;
+#endif
+ host_add_key(KC_SCROLLLOCK);
+ host_send_keyboard_report();
+ host_del_key(KC_SCROLLLOCK);
+ host_send_keyboard_report();
+ }
#endif
+
else if IS_KEY(code) {
host_del_key(code);
host_send_keyboard_report();
host_del_mods(MOD_BIT(code));
host_send_keyboard_report();
}
+ else if IS_SYSTEM(code) {
+ host_system_send(0);
+ }
+ else if IS_CONSUMER(code) {
+ host_consumer_send(0);
+ }
}
void add_mods(uint8_t mods)
case ACT_LMODS_TAP:
case ACT_RMODS_TAP:
case ACT_LAYER_TAP:
- case ACT_LAYER_TAP1:
+ case ACT_LAYER_TAP_EXT:
return true;
case ACT_MACRO:
case ACT_FUNCTION:
case ACT_MOUSEKEY: dprint("ACT_MOUSEKEY"); break;
case ACT_LAYER: dprint("ACT_LAYER"); break;
case ACT_LAYER_TAP: dprint("ACT_LAYER_TAP"); break;
- case ACT_LAYER_TAP1: dprint("ACT_LAYER_TAP1"); break;
+ case ACT_LAYER_TAP_EXT: dprint("ACT_LAYER_TAP_EXT"); break;
case ACT_MACRO: dprint("ACT_MACRO"); break;
case ACT_COMMAND: dprint("ACT_COMMAND"); break;
case ACT_FUNCTION: dprint("ACT_FUNCTION"); break;