diff options
| author | Stefan Kerkmann <karlk90@pm.me> | 2022-12-17 15:06:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-17 14:06:27 +0000 |
| commit | 85984902cfcfd852daf335f67cb97d6520531def (patch) | |
| tree | 464ca8c4c1a4bb14e812fcd4b4aad5facd0ee2ea /quantum/action_tapping.c | |
| parent | dedc54a328ab900f47da8478bd9c6b7d14891e15 (diff) | |
Introduce IS_EVENT instead of !IS_NOEVENT (#19366)
Diffstat (limited to 'quantum/action_tapping.c')
| -rw-r--r-- | quantum/action_tapping.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index 3a9bc549ac..821265d399 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | # endif | 17 | # endif |
| 18 | # endif | 18 | # endif |
| 19 | 19 | ||
| 20 | # define IS_TAPPING() !IS_NOEVENT(tapping_key.event) | 20 | # define IS_TAPPING() IS_EVENT(tapping_key.event) |
| 21 | # define IS_TAPPING_PRESSED() (IS_TAPPING() && tapping_key.event.pressed) | 21 | # define IS_TAPPING_PRESSED() (IS_TAPPING() && tapping_key.event.pressed) |
| 22 | # define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed) | 22 | # define IS_TAPPING_RELEASED() (IS_TAPPING() && !tapping_key.event.pressed) |
| 23 | # define IS_TAPPING_KEY(k) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (k))) | 23 | # define IS_TAPPING_KEY(k) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (k))) |
| @@ -85,7 +85,7 @@ static void debug_waiting_buffer(void); | |||
| 85 | */ | 85 | */ |
| 86 | void action_tapping_process(keyrecord_t record) { | 86 | void action_tapping_process(keyrecord_t record) { |
| 87 | if (process_tapping(&record)) { | 87 | if (process_tapping(&record)) { |
| 88 | if (!IS_NOEVENT(record.event)) { | 88 | if (IS_EVENT(record.event)) { |
| 89 | ac_dprintf("processed: "); | 89 | ac_dprintf("processed: "); |
| 90 | debug_record(record); | 90 | debug_record(record); |
| 91 | ac_dprintf("\n"); | 91 | ac_dprintf("\n"); |
| @@ -101,7 +101,7 @@ void action_tapping_process(keyrecord_t record) { | |||
| 101 | } | 101 | } |
| 102 | 102 | ||
| 103 | // process waiting_buffer | 103 | // process waiting_buffer |
| 104 | if (!IS_NOEVENT(record.event) && waiting_buffer_head != waiting_buffer_tail) { | 104 | if (IS_EVENT(record.event) && waiting_buffer_head != waiting_buffer_tail) { |
| 105 | ac_dprintf("---- action_exec: process waiting_buffer -----\n"); | 105 | ac_dprintf("---- action_exec: process waiting_buffer -----\n"); |
| 106 | } | 106 | } |
| 107 | for (; waiting_buffer_tail != waiting_buffer_head; waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE) { | 107 | for (; waiting_buffer_tail != waiting_buffer_head; waiting_buffer_tail = (waiting_buffer_tail + 1) % WAITING_BUFFER_SIZE) { |
| @@ -113,7 +113,7 @@ void action_tapping_process(keyrecord_t record) { | |||
| 113 | break; | 113 | break; |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | if (!IS_NOEVENT(record.event)) { | 116 | if (IS_EVENT(record.event)) { |
| 117 | ac_dprintf("\n"); | 117 | ac_dprintf("\n"); |
| 118 | } | 118 | } |
| 119 | } | 119 | } |
| @@ -316,7 +316,7 @@ bool process_tapping(keyrecord_t *keyp) { | |||
| 316 | debug_tapping_key(); | 316 | debug_tapping_key(); |
| 317 | return true; | 317 | return true; |
| 318 | } else { | 318 | } else { |
| 319 | if (!IS_NOEVENT(event)) { | 319 | if (IS_EVENT(event)) { |
| 320 | ac_dprintf("Tapping: key event while last tap(>0).\n"); | 320 | ac_dprintf("Tapping: key event while last tap(>0).\n"); |
| 321 | } | 321 | } |
| 322 | process_record(keyp); | 322 | process_record(keyp); |
| @@ -362,7 +362,7 @@ bool process_tapping(keyrecord_t *keyp) { | |||
| 362 | debug_tapping_key(); | 362 | debug_tapping_key(); |
| 363 | return true; | 363 | return true; |
| 364 | } else { | 364 | } else { |
| 365 | if (!IS_NOEVENT(event)) { | 365 | if (IS_EVENT(event)) { |
| 366 | ac_dprintf("Tapping: key event while last timeout tap(>0).\n"); | 366 | ac_dprintf("Tapping: key event while last timeout tap(>0).\n"); |
| 367 | } | 367 | } |
| 368 | process_record(keyp); | 368 | process_record(keyp); |
| @@ -402,7 +402,7 @@ bool process_tapping(keyrecord_t *keyp) { | |||
| 402 | return true; | 402 | return true; |
| 403 | } | 403 | } |
| 404 | } else { | 404 | } else { |
| 405 | if (!IS_NOEVENT(event)) ac_dprintf("Tapping: other key just after tap.\n"); | 405 | if (IS_EVENT(event)) ac_dprintf("Tapping: other key just after tap.\n"); |
| 406 | process_record(keyp); | 406 | process_record(keyp); |
| 407 | return true; | 407 | return true; |
| 408 | } | 408 | } |
