summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorprecondition <57645186+precondition@users.noreply.github.com>2022-12-13 12:20:07 +0100
committerGitHub <noreply@github.com>2022-12-13 22:20:07 +1100
commit515dd18c2801663bbac0e59f683c2a93e4bd9b1a (patch)
treea60fa641a1d5e0e3ff08fbb0a6718c8aa5280f15 /docs
parentca13734f912e64c632daf816e700b1b176d0ac8e (diff)
Remove IGNORE_MOD_TAP_INTERRUPT_PER_KEY in favour of HOLD_ON_OTHER_KEY_PRESS_PER_KEY (#15741)
Diffstat (limited to 'docs')
-rw-r--r--docs/ChangeLog/20230226/PR15741.md43
-rw-r--r--docs/config_options.md7
-rw-r--r--docs/feature_auto_shift.md11
-rw-r--r--docs/ja/config_options.md2
-rw-r--r--docs/ja/tap_hold.md19
-rw-r--r--docs/tap_hold.md93
6 files changed, 131 insertions, 44 deletions
diff --git a/docs/ChangeLog/20230226/PR15741.md b/docs/ChangeLog/20230226/PR15741.md
new file mode 100644
index 0000000000..385816d65b
--- /dev/null
+++ b/docs/ChangeLog/20230226/PR15741.md
@@ -0,0 +1,43 @@
1`IGNORE_MOD_TAP_INTERRUPT_PER_KEY` has been removed and `IGNORE_MOD_TAP_INTERRUPT` deprecated as a stepping stone towards making `IGNORE_MOD_TAP_INTERRUPT` the new default behavior for mod-taps in the future.
2
3In place of the now removed `IGNORE_MOD_TAP_INTERRUPT_PER_KEY`, one must use the pre-existing `HOLD_ON_OTHER_KEY_PRESS` option.
4
5In most cases, updating `get_ignore_mod_tap_interrupt` to `get_hold_on_other_key_press` is simply a matter of renaming the function and swapping every `true` by `false` and vice versa. The one subtlety you may need to look out for is that the `get_ignore_mod_tap_interrupt` was only ever called with mod-taps passed in as the `keycode` argument, while the `keycode` argument of `get_hold_on_other_key_press` can be any dual-role key. This includes not only mod-taps, but also layer-taps, one shot keys, `TT(layer)` and more. This has an impact on the effect of the `default` case in a typical per-key configuration making use of a `switch(keycode)` statement.
6
7To illustrate, let's take the example of a configuration where we'd want all mod-taps to activate the modifier if another key is pressed while held with the exception of `LCTL_T(KC_A)`, which should ignore keys pressed while it is held and activate the modifier only if it has been held for longer than the tapping term. In addition, we would like to keep the default "ignore-interrupt" behavior of layer taps.
8
9An old way to do this would be via the following code:
10
11```c
12bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
13 switch(keycode) {
14 case LCTL_T(KC_A):
15 return true;
16 default:
17 return false;
18 }
19}
20```
21
22The correct way to update this code without accidentally changing how the layer-taps work would be the following:
23
24```c
25bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
26 switch(keycode) {
27 // Capture all mod-tap keycodes.
28 case QK_MOD_TAP ... QK_MOD_TAP_MAX:
29 if (keycode == LCTL_T(KC_A)) {
30 // Disable HOLD_ON_OTHER_KEY_PRESS for LCTL_T(KC_A)
31 // aka enable IGNORE_MOD_TAP_INTERRUPT for LCTL_T(KC_A).
32 return false;
33 } else {
34 // Enable HOLD_ON_OTHER_KEY_PRESS for every other mod-tap keycode.
35 return true;
36 }
37 default:
38 return false;
39 }
40}
41```
42
43For more information, you are invited to read the sections on [IGNORE_MOD_TAP_INTERRUPT](tap_hold.md#ignore-mod-tap-interrupt) and [HOLD_ON_OTHER_KEY_PRESS](tap_hold.md#hold-on-other-key-press) in the page on [Tap-Hold configuration options](tap_hold.md).
diff --git a/docs/config_options.md b/docs/config_options.md
index edaa739201..7a91160bcd 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -169,8 +169,6 @@ If you define these options you will enable the associated feature, which may in
169* `#define IGNORE_MOD_TAP_INTERRUPT` 169* `#define IGNORE_MOD_TAP_INTERRUPT`
170 * makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the `TAPPING_TERM` for both keys. 170 * makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the `TAPPING_TERM` for both keys.
171 * See [Ignore Mod Tap Interrupt](tap_hold.md#ignore-mod-tap-interrupt) for details 171 * See [Ignore Mod Tap Interrupt](tap_hold.md#ignore-mod-tap-interrupt) for details
172* `#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
173 * enables handling for per key `IGNORE_MOD_TAP_INTERRUPT` settings
174* `#define QUICK_TAP_TERM 100` 172* `#define QUICK_TAP_TERM 100`
175 * tap-then-hold timing to use a dual role key to repeat keycode 173 * tap-then-hold timing to use a dual role key to repeat keycode
176 * See [Quick Tap Term](tap_hold.md#quick-tap-term) 174 * See [Quick Tap Term](tap_hold.md#quick-tap-term)
@@ -178,6 +176,11 @@ If you define these options you will enable the associated feature, which may in
178 * Defaults to `TAPPING_TERM` if not defined 176 * Defaults to `TAPPING_TERM` if not defined
179* `#define QUICK_TAP_TERM_PER_KEY` 177* `#define QUICK_TAP_TERM_PER_KEY`
180 * enables handling for per key `QUICK_TAP_TERM` settings 178 * enables handling for per key `QUICK_TAP_TERM` settings
179* `#define HOLD_ON_OTHER_KEY_PRESS`
180 * selects the hold action of a dual-role key as soon as the tap of the dual-role key is interrupted by the press of another key.
181 * See "[hold on other key press](tap_hold.md#hold-on-other-key-press)" for details
182* `#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY`
183 * enables handling for per key `HOLD_ON_OTHER_KEY_PRESS` settings
181* `#define LEADER_TIMEOUT 300` 184* `#define LEADER_TIMEOUT 300`
182 * how long before the leader key times out 185 * how long before the leader key times out
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. 186 * 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.
diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md
index d3437a9c60..1719807e26 100644
--- a/docs/feature_auto_shift.md
+++ b/docs/feature_auto_shift.md
@@ -281,16 +281,7 @@ Tap Hold Configurations work a little differently when using Retro Shift.
281Referencing `TAPPING_TERM` makes little sense, as holding longer would result in 281Referencing `TAPPING_TERM` makes little sense, as holding longer would result in
282shifting one of the keys. 282shifting one of the keys.
283 283
284`IGNORE_MOD_TAP_INTERRUPT` changes *only* rolling from a mod tap (releasing it 284`RETRO_SHIFT` enables [`PERMISSIVE_HOLD`-like behaviour](tap_hold.md#permissive-hold) (even if not explicitly enabled) on all mod-taps for which `RETRO_SHIFT` applies.
285first), sending both keys instead of the modifier on the second. Its effects on
286nested presses are ignored.
287
288As nested taps were changed to act as though `PERMISSIVE_HOLD` is set unless only
289`IGNORE_MOD_TAP_INTERRUPT` is (outside of Retro Shift), and Retro Shift ignores
290`IGNORE_MOD_TAP_INTERRUPT`, `PERMISSIVE_HOLD` has no effect on Mod Taps.
291
292Nested taps will *always* act as though the `TAPPING_TERM` was exceeded for both
293Mod and Layer Tap keys.
294 285
295## Using Auto Shift Setup 286## Using Auto Shift Setup
296 287
diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md
index c95753bd5d..6135721a42 100644
--- a/docs/ja/config_options.md
+++ b/docs/ja/config_options.md
@@ -162,8 +162,6 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
162* `#define IGNORE_MOD_TAP_INTERRUPT` 162* `#define IGNORE_MOD_TAP_INTERRUPT`
163 * 両方のキーに `TAPPING_TERM` を適用することで、ホールド時に他のキーに変換するキーを使ってローリングコンボ (zx) をすることができるようにします 163 * 両方のキーに `TAPPING_TERM` を適用することで、ホールド時に他のキーに変換するキーを使ってローリングコンボ (zx) をすることができるようにします
164 * 詳細は [Ignore Mod Tap Interrupt](ja/tap_hold.md#ignore-mod-tap-interrupt) を見てください 164 * 詳細は [Ignore Mod Tap Interrupt](ja/tap_hold.md#ignore-mod-tap-interrupt) を見てください
165* `#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
166 * キーごとの `IGNORE_MOD_TAP_INTERRUPT` 設定の処理を有効にします
167* `#define TAPPING_FORCE_HOLD` 165* `#define TAPPING_FORCE_HOLD`
168 * タップされた直後に、デュアルロールキーを修飾子として使用できるようにします 166 * タップされた直後に、デュアルロールキーを修飾子として使用できるようにします
169 * [Tapping Force Hold](ja/tap_hold.md#tapping-force-hold)を見てください 167 * [Tapping Force Hold](ja/tap_hold.md#tapping-force-hold)を見てください
diff --git a/docs/ja/tap_hold.md b/docs/ja/tap_hold.md
index 07242821a9..ac64fe6ce3 100644
--- a/docs/ja/tap_hold.md
+++ b/docs/ja/tap_hold.md
@@ -110,25 +110,6 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
110 110
111?> `許容ホールド`を有効にすると、これは両方がどのように動作するかを変更します。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。 111?> `許容ホールド`を有効にすると、これは両方がどのように動作するかを変更します。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。
112 112
113この機能をより細かく制御するために、以下を `config.h` に追加することができます:
114
115```c
116#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
117```
118
119そして、以下の関数をキーマップに追加します:
120
121```c
122bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
123 switch (keycode) {
124 case SFT_T(KC_SPC):
125 return true;
126 default:
127 return false;
128 }
129}
130```
131
132## タッピング強制ホールド 113## タッピング強制ホールド
133 114
134`タッピング強制ホールド` を有効にするには、以下を `config.h` に追加します: 115`タッピング強制ホールド` を有効にするには、以下を `config.h` に追加します:
diff --git a/docs/tap_hold.md b/docs/tap_hold.md
index fa6c6abc14..348e2655eb 100644
--- a/docs/tap_hold.md
+++ b/docs/tap_hold.md
@@ -118,7 +118,7 @@ The reason is that `TAPPING_TERM` is a macro that expands to a constant integer
118 118
119The code which decides between the tap and hold actions of dual-role keys supports three different modes, in increasing order of preference for the hold action: 119The code which decides between the tap and hold actions of dual-role keys supports three different modes, in increasing order of preference for the hold action:
120 120
1211. The default mode selects the hold action only if the dual-role key is held down longer than the tapping term. In this mode pressing other keys while the dual-role key is held down does not influence the tap-or-hold decision. 1211. The default mode selects the hold action only if the dual-role key is held down longer than the tapping term. In this mode pressing other keys while the dual-role key is held down does not influence the tap-or-hold decision. In other words, this mode ignores interrupts.
122 122
1232. The “permissive hold” mode, in addition to the default behavior, immediately selects the hold action when another key is tapped (pressed and then released) while the dual-role key is held down, even if this happens earlier than the tapping term. If another key is just pressed, but then the dual-role key is released before that other key (and earlier than the tapping term), this mode will still select the tap action. 1232. The “permissive hold” mode, in addition to the default behavior, immediately selects the hold action when another key is tapped (pressed and then released) while the dual-role key is held down, even if this happens earlier than the tapping term. If another key is just pressed, but then the dual-role key is released before that other key (and earlier than the tapping term), this mode will still select the tap action.
124 124
@@ -126,6 +126,73 @@ The code which decides between the tap and hold actions of dual-role keys suppor
126 126
127Note that until the tap-or-hold decision completes (which happens when either the dual-role key is released, or the tapping term has expired, or the extra condition for the selected decision mode is satisfied), key events are delayed and not transmitted to the host immediately. The default mode gives the most delay (if the dual-role key is held down, this mode always waits for the whole tapping term), and the other modes may give less delay when other keys are pressed, because the hold action may be selected earlier. 127Note that until the tap-or-hold decision completes (which happens when either the dual-role key is released, or the tapping term has expired, or the extra condition for the selected decision mode is satisfied), key events are delayed and not transmitted to the host immediately. The default mode gives the most delay (if the dual-role key is held down, this mode always waits for the whole tapping term), and the other modes may give less delay when other keys are pressed, because the hold action may be selected earlier.
128 128
129### Comparison :id=comparison
130
131To better illustrate the tap-or-hold decision modes, let us compare the expected output of each decision mode in a handful of tapping scenarios involving a mod-tap key (`LSFT_T(KC_A)`) and a regular key (`KC_B`) with the `TAPPING_TERM` set to 200ms.
132
133By default, mod-taps behave like `HOLD_ON_OTHER_KEY_PRESS`, while layer-taps behave like "Ignore Interrupt" out of the box. If you want "Ignore Interrupt"-like behaviour for mod-taps, you must enable `IGNORE_MOD_TAP_INTERRUPT`, or return `false` in the `get_hold_on_other_key_press` function for all mod-taps.
134
135Note: "`kc` held" in the "Physical key event" column means that the key wasn't physically released yet at this point in time.
136
137#### Distinct taps (AABB) :id=distinct-taps
138
139| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
140|------|--------------------|----------------|-------------------|----------------------------|
141| 0 | `LSFT_T(KC_A)` down| | | |
142| 199 | `LSFT_T(KC_A)` up | a | a | a |
143| 210 | `KC_B` down | ab | ab | ab |
144| 220 | `KC_B` up | ab | ab | ab |
145
146| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
147|------|--------------------|----------------|-------------------|----------------------------|
148| 0 | `LSFT_T(KC_A)` down| | | |
149| 200 | `LSFT_T(KC_A)` held|<kbd>Shift</kbd>| <kbd>Shift</kbd> | <kbd>Shift</kbd> |
150| 201 | `LSFT_T(KC_A)` up |<kbd>Shift</kbd>| <kbd>Shift</kbd> | <kbd>Shift</kbd> |
151| 205 | `KC_B` down | b | b | b |
152| 210 | `KC_B` up | b | b | b |
153
154#### Nested tap (ABBA) :id=nested-tap
155
156| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
157|------|--------------------|----------------|-------------------|----------------------------|
158| 0 | `LSFT_T(KC_A)` down| | | |
159| 110 | `KC_B` down | | | B |
160| 120 | `KC_B` up | | B | B |
161| 199 | `LSFT_T(KC_A)` up | ab | B | B |
162
163| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
164|------|--------------------|----------------|-------------------|----------------------------|
165| 0 | `LSFT_T(KC_A)` down| | | |
166| 110 | `KC_B` down | | | B |
167| 120 | `KC_B` up | | B | B |
168| 200 | `LSFT_T(KC_A)` held| B | B | B |
169| 210 | `LSFT_T(KC_A)` up | B | B | B |
170
171| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
172|------|--------------------|----------------|-------------------|----------------------------|
173| 0 | `LSFT_T(KC_A)` down| | | |
174| 200 | `LSFT_T(KC_A)` held|<kbd>Shift</kbd>| <kbd>Shift</kbd> | <kbd>Shift</kbd> |
175| 205 | `KC_B` down | B | B | B |
176| 210 | `KC_B` up | B | B | B |
177| 220 | `LSFT_T(KC_A)` up | B | B | B |
178
179#### Rolling keys (ABAB) :id=rolling-keys
180
181| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
182|------|--------------------|----------------|-------------------|----------------------------|
183| 0 | `LSFT_T(KC_A)` down| | | |
184| 110 | `KC_B` down | | | B |
185| 130 | `LSFT_T(KC_A)` up | ab | ab | B |
186| 140 | `KC_B` up | ab | ab | B |
187
188| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
189|------|--------------------|----------------|-------------------|----------------------------|
190| 0 | `LSFT_T(KC_A)` down| | | |
191| 110 | `KC_B` down | | | B |
192| 200 | `LSFT_T(KC_A)` held| B | B | B |
193| 205 | `LSFT_T(KC_A)` up | B | B | B |
194| 210 | `KC_B` up | B | B | B |
195
129### Default Mode 196### Default Mode
130Example sequence 1 (the `L` key is also mapped to `KC_RGHT` on layer 2): 197Example sequence 1 (the `L` key is also mapped to `KC_RGHT` on layer 2):
131 198
@@ -179,8 +246,6 @@ since `SFT_T(KC_A)` is NOT held longer than the `TAPPING_TERM`.
179However, the actual output would be capital `X` (`SHIFT` + `x`) due to reasons 246However, the actual output would be capital `X` (`SHIFT` + `x`) due to reasons
180explained under [Ignore Mod Tap Interrupt](#ignore-mod-tap-interrupt). 247explained under [Ignore Mod Tap Interrupt](#ignore-mod-tap-interrupt).
181 248
182
183
184### Permissive Hold 249### Permissive Hold
185 250
186The “permissive hold” mode can be enabled for all dual-role keys by adding the corresponding option to `config.h`: 251The “permissive hold” mode can be enabled for all dual-role keys by adding the corresponding option to `config.h`:
@@ -212,7 +277,7 @@ An example of a sequence that is affected by the “permissive hold” mode:
212 +---------------------------|--------+ 277 +---------------------------|--------+
213``` 278```
214 279
215Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `PERMISSIVE_HOLD` option enabled, the Layer Tap key is considered as a layer switch if another key is tapped, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2). We could describe this sequence as a “nested press” (the modified key's key down and key up events are “nested” between the dual-role key's key down and key up events). 280Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `PERMISSIVE_HOLD` option enabled, the Layer Tap key is considered as a layer switch if another key is tapped, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2). We could describe this sequence as a “nested tap” (the modified key's key down and key up events are “nested” between the dual-role key's key down and key up events).
216 281
217However, this slightly different sequence will not be affected by the “permissive hold” mode: 282However, this slightly different sequence will not be affected by the “permissive hold” mode:
218 283
@@ -235,7 +300,7 @@ However, this slightly different sequence will not be affected by the “permiss
235 300
236In the sequence above the dual-role key is released before the other key is released, and if that happens within the tapping term, the “permissive hold” mode will still choose the tap action for the dual-role key, and the sequence will be registered as `al` by the host. We could describe this as a “rolling press” (the two keys' key down and key up events behave as if you were rolling a ball across the two keys, first pressing each key down in sequence and then releasing them in the same order). 301In the sequence above the dual-role key is released before the other key is released, and if that happens within the tapping term, the “permissive hold” mode will still choose the tap action for the dual-role key, and the sequence will be registered as `al` by the host. We could describe this as a “rolling press” (the two keys' key down and key up events behave as if you were rolling a ball across the two keys, first pressing each key down in sequence and then releasing them in the same order).
237 302
238?> The `PERMISSIVE_HOLD` option also affects Mod Tap keys, but this may not be noticeable if you do not also enable the `IGNORE_MOD_TAP_INTERRUPT` option for those keys, because the default handler for Mod Tap keys also considers both the “nested press” and “rolling press” sequences like shown above as a modifier hold, not the tap action. If you do not enable `IGNORE_MOD_TAP_INTERRUPT`, the effect of `PERMISSIVE_HOLD` on Mod Tap keys would be limited to reducing the delay before the key events are made visible to the host. 303?> The `PERMISSIVE_HOLD` option is not noticeable if you also enable `HOLD_ON_OTHER_KEY_PRESS` because the latter option considers both the “nested tap” and “rolling press” sequences like shown above as a hold action, not the tap action. `HOLD_ON_OTHER_KEY_PRESS` makes the Tap-Or-Hold decision earlier in the chain of key events, thus taking a precedence over `PERMISSIVE_HOLD`. This remark also applies to default mod-taps.
239 304
240For more granular control of this feature, you can add the following to your `config.h`: 305For more granular control of this feature, you can add the following to your `config.h`:
241 306
@@ -291,7 +356,7 @@ An example of a sequence that is affected by the “hold on other key press” m
291 356
292Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `HOLD_ON_OTHER_KEY_PRESS` option enabled, the Layer Tap key is considered as a layer switch if another key is pressed, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2). 357Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `HOLD_ON_OTHER_KEY_PRESS` option enabled, the Layer Tap key is considered as a layer switch if another key is pressed, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2).
293 358
294?> The `HOLD_ON_OTHER_KEY_PRESS` option also affects Mod Tap keys, but this may not be noticeable if you do not also enable the `IGNORE_MOD_TAP_INTERRUPT` option for those keys, because the default handler for Mod Tap keys also considers the “rolling press” sequence like shown above as a modifier hold, not the tap action. If you do not enable `IGNORE_MOD_TAP_INTERRUPT`, the effect of `HOLD_ON_OTHER_KEY_PRESS` on Mod Tap keys would be limited to reducing the delay before the key events are made visible to the host. 359?> The `HOLD_ON_OTHER_KEY_PRESS` option is essentially redundant with the default mod-tap behaviour. The only notable difference is that `HOLD_ON_OTHER_KEY_PRESS` reduces the delay before the key events are made visible to the host.
295 360
296For more granular control of this feature, you can add the following to your `config.h`: 361For more granular control of this feature, you can add the following to your `config.h`:
297 362
@@ -355,26 +420,32 @@ However, if the `HOLD_ON_OTHER_KEY_PRESS` option is enabled in addition to `IGNO
355For more granular control of this feature, you can add the following to your `config.h`: 420For more granular control of this feature, you can add the following to your `config.h`:
356 421
357```c 422```c
358#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY 423#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
359``` 424```
360 425
426?> This option affects *all* dual-role keys.
427
361You can then add the following function to your keymap: 428You can then add the following function to your keymap:
362 429
363```c 430```c
364bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { 431bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
365 switch (keycode) { 432 switch (keycode) {
366 case SFT_T(KC_SPC): 433 case SFT_T(KC_SPC):
367 // Do not force the mod-tap key press to be handled as a modifier 434 // Do not force the mod-tap key press to be handled as a modifier
368 // if any other key was pressed while the mod-tap key is held down. 435 // if any other key was pressed while the mod-tap key is held down.
369 return true; 436 return false;
370 default: 437 default:
371 // Force the mod-tap key press to be handled as a modifier if any 438 // Force the dual-role key press to be handled as a modifier if any
372 // other key was pressed while the mod-tap key is held down. 439 // other key was pressed while the mod-tap key is held down.
373 return false; 440 return true;
374 } 441 }
375} 442}
376``` 443```
377 444
445Note that you must return `false` in `get_hold_on_other_key_press` in order to apply `IGNORE_MOD_TAP_INTERRUPT` for a certain mod-tap key.
446
447?> `IGNORE_MOD_TAP_INTERRUPT[_PER_KEY]` is being progressively phased out to align the (default) behavior and configuration of mod-taps with the rest of dual-role keys.
448
378## Quick Tap Term 449## Quick Tap Term
379 450
380When 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. 451When 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.