You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Core] Replace Tapping Force Hold feature with Quick Tap Term (qmk#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>
Copy file name to clipboardExpand all lines: docs/config_options.md
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -171,12 +171,13 @@ If you define these options you will enable the associated feature, which may in
171
171
* See [Ignore Mod Tap Interrupt](tap_hold.md#ignore-mod-tap-interrupt) for details
172
172
*`#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
173
173
* enables handling for per key `IGNORE_MOD_TAP_INTERRUPT` settings
174
-
*`#define TAPPING_FORCE_HOLD`
175
-
* makes it possible to use a dual role key as modifier shortly after having been tapped
176
-
* See [Tapping Force Hold](tap_hold.md#tapping-force-hold)
177
-
* Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
178
-
*`#define TAPPING_FORCE_HOLD_PER_KEY`
179
-
* enables handling for per key `TAPPING_FORCE_HOLD` settings
174
+
*`#define QUICK_TAP_TERM 100`
175
+
* tap-then-hold timing to use a dual role key to repeat keycode
176
+
* See [Quick Tap Term](tap_hold.md#quick-tap-term)
177
+
* Changes the timing of Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
178
+
* Defaults to `TAPPING_TERM` if not defined
179
+
*`#define QUICK_TAP_TERM_PER_KEY`
180
+
* enables handling for per key `QUICK_TAP_TERM` settings
180
181
*`#define LEADER_TIMEOUT 300`
181
182
* how long before the leader key times out
182
183
* If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
To enable `tapping force hold`, add the following to your `config.h`:
380
+
When the user holds a key after tapping it, the tapping function is repeated by default, rather than activating the hold function. This allows keeping the ability to auto-repeat the tapping function of a dual-role key. `QUICK_TAP_TERM` enables fine tuning of that ability. If set to `0`, it will remove the auto-repeat ability and activate the hold function instead.
381
+
382
+
`QUICK_TAP_TERM` is set to `TAPPING_TERM` by default, which is the maximum allowed value for `QUICK_TAP_TERM`. To override its value (in milliseconds) add the following to your `config.h`:
381
383
382
384
```c
383
-
#define TAPPING_FORCE_HOLD
385
+
#define QUICK_TAP_TERM 120
384
386
```
385
387
386
-
When the user holds a key after tapping it, the tapping function is repeated by default, rather than activating the hold function. This allows keeping the ability to auto-repeat the tapping function of a dual-role key. `TAPPING_FORCE_HOLD` removes that ability to let the user activate the hold function instead, in the case of holding the dual-role key after having tapped it.
387
-
388
388
Example:
389
389
390
390
-`SFT_T(KC_A)` Down
391
391
-`SFT_T(KC_A)` Up
392
392
-`SFT_T(KC_A)` Down
393
-
- wait until the tapping term expires...
394
-
-`SFT_T(KC_A)` Up
393
+
- (wait until tapping term expires...)
395
394
396
-
With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its auto-repeat function.
395
+
With default settings, `a` will be sent on the first release, then `a` will be sent on the second press allowing the computer to trigger its autorepeat function until the key is released.
397
396
398
-
With `TAPPING_FORCE_HOLD`, the second press will be interpreted as a Shift, allowing to use it as a modifier shortly after having used it as a tap.
397
+
With `QUICK_TAP_TERM` configured, the timing between `SFT_T(KC_A)` up and `SFT_T(KC_A)` down must be within `QUICK_TAP_TERM` to trigger auto repeat. Otherwise the second press will be sent as a Shift. If `QUICK_TAP_TERM` is set to `0`, the second press will always be sent as a Shift, effectively disabling auto-repeat.
399
398
400
-
!> `TAPPING_FORCE_HOLD`will break anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tap Toggle).
399
+
!> `QUICK_TAP_TERM` timing will also impact anything that uses tapping toggles (Such as the `TT` layer keycode, and the One Shot Tap Toggle).
401
400
402
401
For more granular control of this feature, you can add the following to your `config.h`:
403
402
404
403
```c
405
-
#defineTAPPING_FORCE_HOLD_PER_KEY
404
+
#defineQUICK_TAP_TERM_PER_KEY
406
405
```
407
406
408
407
You can then add the following function to your keymap:
0 commit comments