summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2022-08-15 16:40:51 +0200
committerGitHub <noreply@github.com>2022-08-15 16:40:51 +0200
commit8ce946b5c8e7026b5d7337becf4719e2795af9bb (patch)
treec21425d58da94308273a1b146b4090ddbe3c055d /quantum
parent5e6175a553dd840a1a43b420097c126ecf770f14 (diff)
downloadqmk_firmware-8ce946b5c8e7026b5d7337becf4719e2795af9bb.tar.gz
qmk_firmware-8ce946b5c8e7026b5d7337becf4719e2795af9bb.zip
[Bug] Add key event check to `is_tap_record` and remove `is_tap_key` (#18063)
Diffstat (limited to 'quantum')
-rw-r--r--quantum/action.c13
-rw-r--r--quantum/action.h1
2 files changed, 4 insertions, 10 deletions
diff --git a/quantum/action.c b/quantum/action.c
index 83f6e2a970..6b2e9104e0 100644
--- a/quantum/action.c
+++ b/quantum/action.c
@@ -1089,16 +1089,11 @@ void clear_keyboard_but_mods_and_keys() {
*
* FIXME: Needs documentation.
*/
-bool is_tap_key(keypos_t key) {
- action_t action = layer_switch_get_action(key);
- return is_tap_action(action);
-}
-
-/** \brief Utilities for actions. (FIXME: Needs better description)
- *
- * FIXME: Needs documentation.
- */
bool is_tap_record(keyrecord_t *record) {
+ if (IS_NOEVENT(record->event)) {
+ return false;
+ }
+
#ifdef COMBO_ENABLE
action_t action;
if (record->keycode) {
diff --git a/quantum/action.h b/quantum/action.h
index 08e1f6ac29..2bc46429b2 100644
--- a/quantum/action.h
+++ b/quantum/action.h
@@ -105,7 +105,6 @@ void clear_keyboard(void);
void clear_keyboard_but_mods(void);
void clear_keyboard_but_mods_and_keys(void);
void layer_switch(uint8_t new_layer);
-bool is_tap_key(keypos_t key);
bool is_tap_record(keyrecord_t *record);
bool is_tap_action(action_t action);