summaryrefslogtreecommitdiffstats
path: root/quantum/action_tapping.h
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2023-02-28 11:22:29 +1100
committerNick Brassel <nick@tzarc.org>2023-02-28 11:22:29 +1100
commitbacec14073b2e897d5a52caf12de5a6a1f7b4078 (patch)
treed4e3e57aac1a829a191831efd2e62c8a43217885 /quantum/action_tapping.h
parentd70e9b8659a7fbbd7069fd542bd07e67e04327a1 (diff)
parentb865b9e1706ad28ae4882bd2e0331e98808295fa (diff)
Merge remote-tracking branch 'upstream/develop'
Diffstat (limited to 'quantum/action_tapping.h')
-rw-r--r--quantum/action_tapping.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/quantum/action_tapping.h b/quantum/action_tapping.h
index bcccc7ac45..6099d80d6d 100644
--- a/quantum/action_tapping.h
+++ b/quantum/action_tapping.h
@@ -22,6 +22,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define TAPPING_TERM 200
#endif
+/* period of quick tap(ms) */
+#if !defined(QUICK_TAP_TERM) || QUICK_TAP_TERM > TAPPING_TERM
+# define QUICK_TAP_TERM TAPPING_TERM
+#endif
+
/* tap count needed for toggling a feature */
#ifndef TAPPING_TOGGLE
# define TAPPING_TOGGLE 5
@@ -36,9 +41,9 @@ void action_tapping_process(keyrecord_t record);
#endif
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record);
+uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record);
bool get_permissive_hold(uint16_t keycode, keyrecord_t *record);
bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record);
-bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record);
bool get_retro_tapping(uint16_t keycode, keyrecord_t *record);
bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record);
@@ -46,10 +51,16 @@ bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record);
extern uint16_t g_tapping_term;
#endif
-#ifdef TAPPING_TERM_PER_KEY
+#if defined(TAPPING_TERM_PER_KEY) && !defined(NO_ACTION_TAPPING)
# define GET_TAPPING_TERM(keycode, record) get_tapping_term(keycode, record)
-#elif defined(DYNAMIC_TAPPING_TERM_ENABLE)
+#elif defined(DYNAMIC_TAPPING_TERM_ENABLE) && !defined(NO_ACTION_TAPPING)
# define GET_TAPPING_TERM(keycode, record) g_tapping_term
#else
# define GET_TAPPING_TERM(keycode, record) (TAPPING_TERM)
#endif
+
+#ifdef QUICK_TAP_TERM_PER_KEY
+# define GET_QUICK_TAP_TERM(keycode, record) get_quick_tap_term(keycode, record)
+#else
+# define GET_QUICK_TAP_TERM(keycode, record) (QUICK_TAP_TERM)
+#endif