-
-static void process(keyevent_t event, action_t action);
-static void register_code(uint8_t code);
-static void unregister_code(uint8_t code);
-static void clear_keyboard(void);
-static void clear_keyboard_but_mods(void);
-static bool sending_anykey(void);
-static void layer_switch(uint8_t new_layer);
-
-
-/* tap */
-#define TAP_TIME 200
-static keyevent_t last_event = {};
-static uint16_t last_event_time = 0;
-static uint8_t tap_count = 0;
-
-/* layer */
-uint8_t default_layer = 0;
-uint8_t current_layer = 0;
-keyrecord_t delaying_layer = {};
-
-#define WAITING_KEYS_BUFFER 3
-static keyrecord_t waiting_keys[WAITING_KEYS_BUFFER] = {};
-static uint8_t waiting_keys_head = 0;
-static bool waiting_keys_enqueue(keyevent_t event, action_t action)
-{
- debug("waiting_keys["); debug_dec(waiting_keys_head); debug("] = ");
- debug_hex16(action.code); debug("\n");
- if (waiting_keys_head < WAITING_KEYS_BUFFER) {
- waiting_keys[waiting_keys_head++] = (keyrecord_t){ .event = event,
- .action = action,
- .mods = host_get_mods() };
- } else {
- return true;
- }
-}
-static void waiting_keys_clear(void)
-{
- waiting_keys_head = 0;
-}
-static bool waiting_keys_has(keypos_t key)