diff options
| -rw-r--r-- | tmk_core/common/action.c | 10 | ||||
| -rw-r--r-- | tmk_core/common/action.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c index b99c2acaa..ec8d6ed7b 100644 --- a/tmk_core/common/action.c +++ b/tmk_core/common/action.c | |||
| @@ -653,7 +653,7 @@ void process_action(keyrecord_t *record, action_t action) | |||
| 653 | 653 | ||
| 654 | #ifndef NO_ACTION_TAPPING | 654 | #ifndef NO_ACTION_TAPPING |
| 655 | #ifdef RETRO_TAPPING | 655 | #ifdef RETRO_TAPPING |
| 656 | if (!is_tap_key(record->event.key)) { | 656 | if (!is_tap_action(action)) { |
| 657 | retro_tapping_counter = 0; | 657 | retro_tapping_counter = 0; |
| 658 | } else { | 658 | } else { |
| 659 | if (event.pressed) { | 659 | if (event.pressed) { |
| @@ -929,7 +929,15 @@ void clear_keyboard_but_mods_and_keys() | |||
| 929 | bool is_tap_key(keypos_t key) | 929 | bool is_tap_key(keypos_t key) |
| 930 | { | 930 | { |
| 931 | action_t action = layer_switch_get_action(key); | 931 | action_t action = layer_switch_get_action(key); |
| 932 | return is_tap_action(action); | ||
| 933 | } | ||
| 932 | 934 | ||
| 935 | /** \brief Utilities for actions. (FIXME: Needs better description) | ||
| 936 | * | ||
| 937 | * FIXME: Needs documentation. | ||
| 938 | */ | ||
| 939 | bool is_tap_action(action_t action) | ||
| 940 | { | ||
| 933 | switch (action.kind.id) { | 941 | switch (action.kind.id) { |
| 934 | case ACT_LMODS_TAP: | 942 | case ACT_LMODS_TAP: |
| 935 | case ACT_RMODS_TAP: | 943 | case ACT_RMODS_TAP: |
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 8e47e5339..799e3bb0e 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h | |||
| @@ -97,6 +97,7 @@ void clear_keyboard_but_mods(void); | |||
| 97 | void clear_keyboard_but_mods_and_keys(void); | 97 | void clear_keyboard_but_mods_and_keys(void); |
| 98 | void layer_switch(uint8_t new_layer); | 98 | void layer_switch(uint8_t new_layer); |
| 99 | bool is_tap_key(keypos_t key); | 99 | bool is_tap_key(keypos_t key); |
| 100 | bool is_tap_action(action_t action); | ||
| 100 | 101 | ||
| 101 | #ifndef NO_ACTION_TAPPING | 102 | #ifndef NO_ACTION_TAPPING |
| 102 | void process_record_tap_hint(keyrecord_t *record); | 103 | void process_record_tap_hint(keyrecord_t *record); |
