#include "nodebug.h"
#endif
+int tp_buttons;
+
+#ifdef RETRO_TAPPING
+int retro_tapping_counter = 0;
+#endif
+
#ifdef FAUXCLICKY_ENABLE
#include <fauxclicky.h>
#endif
if (!IS_NOEVENT(event)) {
dprint("\n---- action_exec: start -----\n");
dprint("EVENT: "); debug_event(event); dprintln();
+#ifdef RETRO_TAPPING
+ retro_tapping_counter++;
+#endif
}
#ifdef FAUXCLICKY_ENABLE
#if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0))
if (has_oneshot_layer_timed_out()) {
- dprintf("Oneshot layer: timeout\n");
clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED);
}
+ if (has_oneshot_mods_timed_out()) {
+ clear_oneshot_mods();
+ }
#endif
#ifndef NO_ACTION_TAPPING
/* Mouse key */
case ACT_MOUSEKEY:
if (event.pressed) {
+ switch (action.key.code) {
+ case KC_MS_BTN1:
+ tp_buttons |= (1<<0);
+ break;
+ case KC_MS_BTN2:
+ tp_buttons |= (1<<1);
+ break;
+ case KC_MS_BTN3:
+ tp_buttons |= (1<<2);
+ break;
+ default:
+ break;
+ }
mousekey_on(action.key.code);
mousekey_send();
} else {
+ switch (action.key.code) {
+ case KC_MS_BTN1:
+ tp_buttons &= ~(1<<0);
+ break;
+ case KC_MS_BTN2:
+ tp_buttons &= ~(1<<1);
+ break;
+ case KC_MS_BTN3:
+ tp_buttons &= ~(1<<2);
+ break;
+ default:
+ break;
+ }
mousekey_off(action.key.code);
mousekey_send();
}
}
#endif
+#ifndef NO_ACTION_TAPPING
+ #ifdef RETRO_TAPPING
+ if (!is_tap_key(record->event.key)) {
+ retro_tapping_counter = 0;
+ } else {
+ if (event.pressed) {
+ if (tap_count > 0) {
+ retro_tapping_counter = 0;
+ } else {
+
+ }
+ } else {
+ if (tap_count > 0) {
+ retro_tapping_counter = 0;
+ } else {
+ if (retro_tapping_counter == 2) {
+ register_code(action.layer_tap.code);
+ unregister_code(action.layer_tap.code);
+ }
+ retro_tapping_counter = 0;
+ }
+ }
+ }
+ #endif
+#endif
+
#ifndef NO_ACTION_ONESHOT
/* Because we switch layers after a oneshot event, we need to release the
* key before we leave the layer or no key up event will be generated.
#endif
add_key(KC_CAPSLOCK);
send_keyboard_report();
+ wait_ms(100);
del_key(KC_CAPSLOCK);
send_keyboard_report();
}
#endif
add_key(KC_NUMLOCK);
send_keyboard_report();
+ wait_ms(100);
del_key(KC_NUMLOCK);
send_keyboard_report();
}
#endif
add_key(KC_SCROLLLOCK);
send_keyboard_report();
+ wait_ms(100);
del_key(KC_SCROLLLOCK);
send_keyboard_report();
}