diff options
author | Albert Y <76888457+filterpaper@users.noreply.github.com> | 2022-12-12 23:52:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-12 16:52:22 +0100 |
commit | cbabc8dbe6a8476d3082e8bc649d330f87e7b904 (patch) | |
tree | 55e73275367047981295d046867d9f70352814c7 /users | |
parent | 8698d109d7c2f4554e0f3c01b017738a0a47f162 (diff) |
[Core] Replace Tapping Force Hold feature with Quick Tap Term (#17007)
* Replace Tapping Force Hold feature with Quick Tap Term
* Replace keyboard level TAPPING_FORCE_HOLD with QUICK_TAP_TERM 0
* Deprecate force hold in info_config.json
* Before and after quick tap term unit tests
* Quick tap unit tests iteration
* Keymap config.h correction
* Remove TAPPING_FORCE_HOLD_PER_KEY macros that were missed
* Add two more test cases for quick tap
* Replace TAPPING_FORCE_HOLD with QUICK_TAP_TERM in configs #2
* Replace TAPPING_FORCE_HOLD_PER_KEY with QUICK_TAP_TERM_PER_KEY in configs #2
* Add function declaration for get_quick_tap_term
Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
Diffstat (limited to 'users')
-rw-r--r-- | users/bcat/config.h | 2 | ||||
-rw-r--r-- | users/cwebster2/config.h | 2 | ||||
-rw-r--r-- | users/drashna/config.h | 2 | ||||
-rw-r--r-- | users/drashna/keyrecords/tapping.c | 8 | ||||
-rw-r--r-- | users/dshields/config.h | 2 | ||||
-rw-r--r-- | users/dshields/dshields.c | 7 | ||||
-rw-r--r-- | users/kuchosauronad0/config.h | 2 | ||||
-rw-r--r-- | users/manna-harbour_miryoku/config.h | 3 | ||||
-rw-r--r-- | users/muppetjones/config.h | 2 | ||||
-rw-r--r-- | users/ridingqwerty/config.h | 2 | ||||
-rw-r--r-- | users/ridingqwerty/ridingqwerty.c | 14 | ||||
-rw-r--r-- | users/uqs/config.h | 2 | ||||
-rw-r--r-- | users/vosechu/config.h | 2 | ||||
-rw-r--r-- | users/xulkal/config.h | 5 | ||||
-rw-r--r-- | users/yet-another-developer/config.h | 2 |
15 files changed, 28 insertions, 29 deletions
diff --git a/users/bcat/config.h b/users/bcat/config.h index 7bb5d71bae..b9eac74ff6 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -35,7 +35,7 @@ /* Turn off key repeat support of the tap keycode for tap-hold keys, enabling * holds to work correctly in quick succession after taps. */ -#define TAPPING_FORCE_HOLD +#define QUICK_TAP_TERM 0 #if defined(OLED_ENABLE) /* The built-in OLED timeout wakes the OLED screen every time the buffer is diff --git a/users/cwebster2/config.h b/users/cwebster2/config.h index 78733687cc..313e6d533f 100644 --- a/users/cwebster2/config.h +++ b/users/cwebster2/config.h @@ -18,7 +18,7 @@ #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 #define TAPPING_TERM_PER_KEY -//#define TAPPING_FORCE_HOLD +//#define QUICK_TAP_TERM 0 #undef PERMISSIVE_HOLD #define IGNORE_MOD_TAP_INTERRUPT #define NO_ACTION_ONESHOT diff --git a/users/drashna/config.h b/users/drashna/config.h index 5c5c131e36..22c789b8c6 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -83,7 +83,7 @@ #if defined(PER_KEY_TAPPING) # define IGNORE_MOD_TAP_INTERRUPT_PER_KEY # define PERMISSIVE_HOLD_PER_KEY -# define TAPPING_FORCE_HOLD_PER_KEY +# define QUICK_TAP_TERM_PER_KEY # define HOLD_ON_OTHER_KEY # define RETRO_TAPPING_PER_KEY # define HOLD_ON_OTHER_KEY_PRESS_PER_KEY diff --git a/users/drashna/keyrecords/tapping.c b/users/drashna/keyrecords/tapping.c index 7496610c2f..37945d2f67 100644 --- a/users/drashna/keyrecords/tapping.c +++ b/users/drashna/keyrecords/tapping.c @@ -57,14 +57,14 @@ __attribute__((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrec } #endif // IGNORE_MOD_TAP_INTERRUPT_PER_KEY -#ifdef TAPPING_FORCE_HOLD_PER_KEY -__attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { +#ifdef QUICK_TAP_TERM_PER_KEY +__attribute__((weak)) uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { default: - return false; + return QUICK_TAP_TERM; } } -#endif // TAPPING_FORCE_HOLD_PER_KEY +#endif // QUICK_TAP_TERM_PER_KEY #ifdef RETRO_TAPPING_PER_KEY __attribute__((weak)) bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { diff --git a/users/dshields/config.h b/users/dshields/config.h index 1420a9178f..279bcf217b 100644 --- a/users/dshields/config.h +++ b/users/dshields/config.h @@ -6,7 +6,7 @@ #define ONESHOT_TIMEOUT 3000 #define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD_PER_KEY -#define TAPPING_FORCE_HOLD_PER_KEY +#define QUICK_TAP_TERM_PER_KEY #define TAPPING_TERM 200 #define BACKLIGHT_BREATHING #define DYNAMIC_MACRO_NO_NESTING diff --git a/users/dshields/dshields.c b/users/dshields/dshields.c index 46f0b33cd3..a8e1333104 100644 --- a/users/dshields/dshields.c +++ b/users/dshields/dshields.c @@ -29,7 +29,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { +uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case MT_A: case MT_S: @@ -39,9 +39,9 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { case MT_K: case MT_L: case MT_SCLN: - return true; + return 0; default: - return false; + return QUICK_TAP_TERM; } } @@ -55,4 +55,3 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { return false; } } - diff --git a/users/kuchosauronad0/config.h b/users/kuchosauronad0/config.h index 9315f879ae..bc0fe67df8 100644 --- a/users/kuchosauronad0/config.h +++ b/users/kuchosauronad0/config.h @@ -70,7 +70,7 @@ // actually sends Ctrl-x. That's bad.) #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD -//#define TAPPING_FORCE_HOLD +//#define QUICK_TAP_TERM 0 //#define RETRO_TAPPING #ifndef TAPPING_TOGGLE diff --git a/users/manna-harbour_miryoku/config.h b/users/manna-harbour_miryoku/config.h index 920003598e..429e08493d 100644 --- a/users/manna-harbour_miryoku/config.h +++ b/users/manna-harbour_miryoku/config.h @@ -15,7 +15,7 @@ #define IGNORE_MOD_TAP_INTERRUPT // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. -#define TAPPING_FORCE_HOLD +#define QUICK_TAP_TERM 0 // Auto Shift #define NO_AUTO_SHIFT_ALPHA @@ -40,4 +40,3 @@ #define COMBO_TERM 200 #define EXTRA_SHORT_COMBOS #endif - diff --git a/users/muppetjones/config.h b/users/muppetjones/config.h index 3dd4d1b1b6..583567d4f3 100644 --- a/users/muppetjones/config.h +++ b/users/muppetjones/config.h @@ -34,7 +34,7 @@ # define IGNORE_MOD_TAP_INTERRUPT // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. -# define TAPPING_FORCE_HOLD +# define QUICK_TAP_TERM 0 #endif diff --git a/users/ridingqwerty/config.h b/users/ridingqwerty/config.h index 6501efe62f..291c4877e1 100644 --- a/users/ridingqwerty/config.h +++ b/users/ridingqwerty/config.h @@ -5,7 +5,7 @@ #define TAPPING_TERM 175 #define MACRO_TIMER 5 -#define TAPPING_FORCE_HOLD_PER_KEY +#define QUICK_TAP_TERM_PER_KEY // testing #define TAPPING_TERM_PER_KEY //#define IGNORE_MOD_TAP_INTERRUPT // rolling R3 "zxcv", etc... diff --git a/users/ridingqwerty/ridingqwerty.c b/users/ridingqwerty/ridingqwerty.c index 8934b9365b..639bb8d2b3 100644 --- a/users/ridingqwerty/ridingqwerty.c +++ b/users/ridingqwerty/ridingqwerty.c @@ -55,11 +55,11 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { } }; -bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case NM(SCLN): - return true; - default: - return false; - } +uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case NM(SCLN): + return 0; + default: + return QUICK_TAP_TERM; + } } diff --git a/users/uqs/config.h b/users/uqs/config.h index 4bb793532b..455aae9da8 100644 --- a/users/uqs/config.h +++ b/users/uqs/config.h @@ -15,7 +15,7 @@ #define TAPPING_TOGGLE 2 // number of taps for a toggle-on-tap #define TAPPING_TERM 170 // ms to trigger tap // https://precondition.github.io/home-row-mods -#define TAPPING_FORCE_HOLD // make tap-then-hold _not_ do key auto repeat +#define QUICK_TAP_TERM 0 // make tap-then-hold _not_ do key auto repeat #define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD // I don't think this works for me, hence I rolled my own implementation. diff --git a/users/vosechu/config.h b/users/vosechu/config.h index 837cc60ff7..81d9305d50 100644 --- a/users/vosechu/config.h +++ b/users/vosechu/config.h @@ -6,7 +6,7 @@ // actually sends Ctrl-x. That's bad.) #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD -//#define TAPPING_FORCE_HOLD +//#define QUICK_TAP_TERM 0 //#define RETRO_TAPPING #ifndef TAPPING_TOGGLE diff --git a/users/xulkal/config.h b/users/xulkal/config.h index 7f7782807e..bc175dda98 100644 --- a/users/xulkal/config.h +++ b/users/xulkal/config.h @@ -1,10 +1,11 @@ #pragma once -#undef TAPPING_FORCE_HOLD - #undef TAPPING_TERM #define TAPPING_TERM 175 +#undef QUICK_TAP_TERM +#define QUICK_TAP_TERM TAPPING_TERM + #define SPACE_CADET_MODIFIER_CARRYOVER #define LSPO_KEYS KC_LSFT, KC_TRNS, KC_LBRC #define RSPC_KEYS KC_RSFT, KC_TRNS, KC_RBRC diff --git a/users/yet-another-developer/config.h b/users/yet-another-developer/config.h index 6d1bf83f0b..030872d3dd 100644 --- a/users/yet-another-developer/config.h +++ b/users/yet-another-developer/config.h @@ -31,7 +31,7 @@ // actually sends Ctrl-x. That's bad.) #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD -//#define TAPPING_FORCE_HOLD +//#define QUICK_TAP_TERM 0 //#define RETRO_TAPPING #ifndef TAPPING_TOGGLE |