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;
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();