X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tmk_core%2Fcommon%2Faction_tapping.c;h=8adf013e16cad6a9b4dfccbe46fbabba890ea296;hb=7c9d5ace143d3cc6d767a354acde814926d566fd;hp=bd9a69ae0a5b45d0f5bf1b29e3653f70c441dd2a;hpb=3e41cde9f99778ca30c03b97470c32780379db43;p=qmk_firmware.git diff --git a/tmk_core/common/action_tapping.c b/tmk_core/common/action_tapping.c index bd9a69ae0..8adf013e1 100644 --- a/tmk_core/common/action_tapping.c +++ b/tmk_core/common/action_tapping.c @@ -36,6 +36,10 @@ static void debug_tapping_key(void); static void debug_waiting_buffer(void); +/** \brief Action Tapping Process + * + * FIXME: Needs doc + */ void action_tapping_process(keyrecord_t record) { if (process_tapping(&record)) { @@ -70,7 +74,7 @@ void action_tapping_process(keyrecord_t record) } -/* Tapping +/** \brief Tapping * * Rule: Tap key is typed(pressed and released) within TAPPING_TERM. * (without interfering by typing other key) @@ -96,7 +100,7 @@ bool process_tapping(keyrecord_t *keyp) // enqueue return false; } -#if TAPPING_TERM >= 500 +#if TAPPING_TERM >= 500 || defined PERMISSIVE_HOLD /* Process a key typed within TAPPING_TERM * This can register the key before settlement of tapping, * useful for long TAPPING_TERM but may prevent fast typing. @@ -263,7 +267,7 @@ bool process_tapping(keyrecord_t *keyp) return true; } } else { - // FIX: process_aciton here? + // FIX: process_action here? // timeout. no sequential tap. debug("Tapping: End(Timeout after releasing last tap): "); debug_event(event); debug("\n"); @@ -277,6 +281,7 @@ bool process_tapping(keyrecord_t *keyp) if (event.pressed && is_tap_key(event.key)) { debug("Tapping: Start(Press tap key).\n"); tapping_key = *keyp; + process_record_tap_hint(&tapping_key); waiting_buffer_scan_tap(); debug_tapping_key(); return true; @@ -288,8 +293,9 @@ bool process_tapping(keyrecord_t *keyp) } -/* - * Waiting buffer +/** \brief Waiting buffer enq + * + * FIXME: Needs docs */ bool waiting_buffer_enq(keyrecord_t record) { @@ -309,12 +315,20 @@ bool waiting_buffer_enq(keyrecord_t record) return true; } +/** \brief Waiting buffer clear + * + * FIXME: Needs docs + */ void waiting_buffer_clear(void) { waiting_buffer_head = 0; waiting_buffer_tail = 0; } +/** \brief Waiting buffer typed + * + * FIXME: Needs docs + */ bool waiting_buffer_typed(keyevent_t event) { for (uint8_t i = waiting_buffer_tail; i != waiting_buffer_head; i = (i + 1) % WAITING_BUFFER_SIZE) { @@ -325,6 +339,10 @@ bool waiting_buffer_typed(keyevent_t event) return false; } +/** \brief Waiting buffer has anykey pressed + * + * FIXME: Needs docs + */ __attribute__((unused)) bool waiting_buffer_has_anykey_pressed(void) { @@ -334,7 +352,10 @@ bool waiting_buffer_has_anykey_pressed(void) return false; } -/* scan buffer for tapping */ +/** \brief Scan buffer for tapping + * + * FIXME: Needs docs + */ void waiting_buffer_scan_tap(void) { // tapping already is settled @@ -358,14 +379,19 @@ void waiting_buffer_scan_tap(void) } -/* - * debug print +/** \brief Tapping key debug print + * + * FIXME: Needs docs */ static void debug_tapping_key(void) { debug("TAPPING_KEY="); debug_record(tapping_key); debug("\n"); } +/** \brief Waiting buffer debug print + * + * FIXME: Needs docs + */ static void debug_waiting_buffer(void) { debug("{ ");