summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--data/mappings/info_config.hjson4
-rw-r--r--data/schemas/keyboard.jsonschema1
-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
-rw-r--r--keyboards/adm42/rev4/keymaps/default/config.h1
-rw-r--r--keyboards/adm42/rev4/keymaps/default/keymap.c18
-rw-r--r--keyboards/bastardkb/scylla/keymaps/cykedev/config.h7
-rw-r--r--keyboards/bastardkb/scylla/keymaps/cykedev/keymap.c13
-rw-r--r--keyboards/converter/usb_usb/keymaps/chriskopher/config.h3
-rw-r--r--keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c10
-rw-r--r--keyboards/crkbd/keymaps/snowe/config.h1
-rw-r--r--keyboards/crkbd/keymaps/snowe/keymap.c10
-rw-r--r--keyboards/ergodox_ez/keymaps/stamm/config.h4
-rw-r--r--keyboards/ergodox_ez/keymaps/stamm/keymap.c4
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/config.h5
-rw-r--r--keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/keymap.c12
-rw-r--r--keyboards/lily58/keymaps/cykedev/config.h2
-rw-r--r--keyboards/lily58/keymaps/cykedev/keymap.c4
-rw-r--r--keyboards/planck/keymaps/adamtabrams/config.h4
-rw-r--r--keyboards/planck/keymaps/adamtabrams/keymap.c4
-rw-r--r--keyboards/planck/keymaps/rootiest/config.h2
-rw-r--r--keyboards/planck/keymaps/rootiest/keymap.c6
-rw-r--r--keyboards/torn/keymaps/kinesish/config.h2
-rw-r--r--keyboards/torn/keymaps/kinesish/keymap.c12
-rw-r--r--quantum/action.c10
-rw-r--r--quantum/action_tapping.c14
-rw-r--r--quantum/process_keycode/process_auto_shift.c41
-rw-r--r--tests/tap_hold_configurations/default_mod_tap/config.h2
-rw-r--r--tests/tap_hold_configurations/default_mod_tap/test_tap_hold.cpp2
-rw-r--r--tests/tap_hold_configurations/ignore_mod_tap_interrupt/config.h21
-rw-r--r--tests/tap_hold_configurations/ignore_mod_tap_interrupt/test.mk18
-rw-r--r--tests/tap_hold_configurations/ignore_mod_tap_interrupt/test_tap_hold.cpp136
-rw-r--r--tests/tap_hold_configurations/permissive_hold/test_tap_hold.cpp2
-rw-r--r--tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/config.h22
-rw-r--r--tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test.mk18
-rw-r--r--tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test_tap_hold.cpp133
-rw-r--r--users/drashna/config.h1
-rw-r--r--users/drashna/keyrecords/tapping.c15
42 files changed, 224 insertions, 515 deletions
diff --git a/data/mappings/info_config.hjson b/data/mappings/info_config.hjson
index 479b1579da..7645598c77 100644
--- a/data/mappings/info_config.hjson
+++ b/data/mappings/info_config.hjson
@@ -32,8 +32,6 @@
"FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"},
"DYNAMIC_KEYMAP_EEPROM_MAX_ADDR": {"info_key": "dynamic_keymap.eeprom_max_addr", "value_type": "int"},
"DYNAMIC_KEYMAP_LAYER_COUNT": {"info_key": "dynamic_keymap.layer_count", "value_type": "int"},
- "IGNORE_MOD_TAP_INTERRUPT": {"info_key": "tapping.ignore_mod_tap_interrupt", "value_type": "bool"},
- "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "tapping.ignore_mod_tap_interrupt_per_key", "value_type": "bool"},
"HOLD_ON_OTHER_KEY_PRESS": {"info_key": "tapping.hold_on_other_key_press", "value_type": "bool"},
"HOLD_ON_OTHER_KEY_PRESS_PER_KEY": {"info_key": "tapping.hold_on_other_key_press_per_key", "value_type": "bool"},
"LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"},
@@ -129,6 +127,8 @@
"QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int", "deprecated": true},
"TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "bool", "deprecated": true},
"TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "bool", "deprecated": true},
+ "IGNORE_MOD_TAP_INTERRUPT": {"info_key": "_deprecated.ignore_mod_tap_interrupt", "value_type": "bool", "deprecated": true},
+ "IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true}
// USB params, need to mark as failure when specified in config.h, rather than deprecated
"PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex", "deprecated": true, "replace_with": "`usb.pid` in info.json"},
diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema
index 7844bfd579..513564a643 100644
--- a/data/schemas/keyboard.jsonschema
+++ b/data/schemas/keyboard.jsonschema
@@ -620,7 +620,6 @@
"force_hold": {"type": "boolean"},
"force_hold_per_key": {"type": "boolean"},
"ignore_mod_tap_interrupt": {"type": "boolean"},
- "ignore_mod_tap_interrupt_per_key": {"type": "boolean"},
"hold_on_other_key_press": {"type": "boolean"},
"hold_on_other_key_press_per_key": {"type": "boolean"},
"permissive_hold": {"type": "boolean"},
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 @@
+`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.
+
+In place of the now removed `IGNORE_MOD_TAP_INTERRUPT_PER_KEY`, one must use the pre-existing `HOLD_ON_OTHER_KEY_PRESS` option.
+
+In 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.
+
+To 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.
+
+An old way to do this would be via the following code:
+
+```c
+bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ case LCTL_T(KC_A):
+ return true;
+ default:
+ return false;
+ }
+}
+```
+
+The correct way to update this code without accidentally changing how the layer-taps work would be the following:
+
+```c
+bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
+ switch(keycode) {
+ // Capture all mod-tap keycodes.
+ case QK_MOD_TAP ... QK_MOD_TAP_MAX:
+ if (keycode == LCTL_T(KC_A)) {
+ // Disable HOLD_ON_OTHER_KEY_PRESS for LCTL_T(KC_A)
+ // aka enable IGNORE_MOD_TAP_INTERRUPT for LCTL_T(KC_A).
+ return false;
+ } else {
+ // Enable HOLD_ON_OTHER_KEY_PRESS for every other mod-tap keycode.
+ return true;
+ }
+ default:
+ return false;
+ }
+}
+```
+
+For 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
* `#define IGNORE_MOD_TAP_INTERRUPT`
* 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.
* See [Ignore Mod Tap Interrupt](tap_hold.md#ignore-mod-tap-interrupt) for details
-* `#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
- * enables handling for per key `IGNORE_MOD_TAP_INTERRUPT` settings
* `#define QUICK_TAP_TERM 100`
* tap-then-hold timing to use a dual role key to repeat keycode
* 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
* Defaults to `TAPPING_TERM` if not defined
* `#define QUICK_TAP_TERM_PER_KEY`
* enables handling for per key `QUICK_TAP_TERM` settings
+* `#define HOLD_ON_OTHER_KEY_PRESS`
+ * 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.
+ * See "[hold on other key press](tap_hold.md#hold-on-other-key-press)" for details
+* `#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY`
+ * enables handling for per key `HOLD_ON_OTHER_KEY_PRESS` settings
* `#define LEADER_TIMEOUT 300`
* how long before the leader key times out
* 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.
Referencing `TAPPING_TERM` makes little sense, as holding longer would result in
shifting one of the keys.
-`IGNORE_MOD_TAP_INTERRUPT` changes *only* rolling from a mod tap (releasing it
-first), sending both keys instead of the modifier on the second. Its effects on
-nested presses are ignored.
-
-As nested taps were changed to act as though `PERMISSIVE_HOLD` is set unless only
-`IGNORE_MOD_TAP_INTERRUPT` is (outside of Retro Shift), and Retro Shift ignores
-`IGNORE_MOD_TAP_INTERRUPT`, `PERMISSIVE_HOLD` has no effect on Mod Taps.
-
-Nested taps will *always* act as though the `TAPPING_TERM` was exceeded for both
-Mod and Layer Tap keys.
+`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.
## Using Auto Shift Setup
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 での全ての利用可能な設定にはデフォルトがあります。
* `#define IGNORE_MOD_TAP_INTERRUPT`
* 両方のキーに `TAPPING_TERM` を適用することで、ホールド時に他のキーに変換するキーを使ってローリングコンボ (zx) をすることができるようにします
* 詳細は [Ignore Mod Tap Interrupt](ja/tap_hold.md#ignore-mod-tap-interrupt) を見てください
-* `#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY`
- * キーごとの `IGNORE_MOD_TAP_INTERRUPT` 設定の処理を有効にします
* `#define TAPPING_FORCE_HOLD`
* タップされた直後に、デュアルロールキーを修飾子として使用できるようにします
* [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) {
?> `許容ホールド`を有効にすると、これは両方がどのように動作するかを変更します。通常のキーには、最初のキーが最初に放された場合、あるいは両方のキーが `TAPPING_TERM` より長くホールドされた場合に、修飾キーが追加されます。
-この機能をより細かく制御するために、以下を `config.h` に追加することができます:
-
-```c
-#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
-```
-
-そして、以下の関数をキーマップに追加します:
-
-```c
-bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case SFT_T(KC_SPC):
- return true;
- default:
- return false;
- }
-}
-```
-
## タッピング強制ホールド
`タッピング強制ホールド` を有効にするには、以下を `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
The 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:
-1. 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.
+1. 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.
2. 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.
@@ -126,6 +126,73 @@ The code which decides between the tap and hold actions of dual-role keys suppor
Note 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.
+### Comparison :id=comparison
+
+To 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.
+
+By 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.
+
+Note: "`kc` held" in the "Physical key event" column means that the key wasn't physically released yet at this point in time.
+
+#### Distinct taps (AABB) :id=distinct-taps
+
+| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
+|------|--------------------|----------------|-------------------|----------------------------|
+| 0 | `LSFT_T(KC_A)` down| | | |
+| 199 | `LSFT_T(KC_A)` up | a | a | a |
+| 210 | `KC_B` down | ab | ab | ab |
+| 220 | `KC_B` up | ab | ab | ab |
+
+| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
+|------|--------------------|----------------|-------------------|----------------------------|
+| 0 | `LSFT_T(KC_A)` down| | | |
+| 200 | `LSFT_T(KC_A)` held|<kbd>Shift</kbd>| <kbd>Shift</kbd> | <kbd>Shift</kbd> |
+| 201 | `LSFT_T(KC_A)` up |<kbd>Shift</kbd>| <kbd>Shift</kbd> | <kbd>Shift</kbd> |
+| 205 | `KC_B` down | b | b | b |
+| 210 | `KC_B` up | b | b | b |
+
+#### Nested tap (ABBA) :id=nested-tap
+
+| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
+|------|--------------------|----------------|-------------------|----------------------------|
+| 0 | `LSFT_T(KC_A)` down| | | |
+| 110 | `KC_B` down | | | B |
+| 120 | `KC_B` up | | B | B |
+| 199 | `LSFT_T(KC_A)` up | ab | B | B |
+
+| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
+|------|--------------------|----------------|-------------------|----------------------------|
+| 0 | `LSFT_T(KC_A)` down| | | |
+| 110 | `KC_B` down | | | B |
+| 120 | `KC_B` up | | B | B |
+| 200 | `LSFT_T(KC_A)` held| B | B | B |
+| 210 | `LSFT_T(KC_A)` up | B | B | B |
+
+| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
+|------|--------------------|----------------|-------------------|----------------------------|
+| 0 | `LSFT_T(KC_A)` down| | | |
+| 200 | `LSFT_T(KC_A)` held|<kbd>Shift</kbd>| <kbd>Shift</kbd> | <kbd>Shift</kbd> |
+| 205 | `KC_B` down | B | B | B |
+| 210 | `KC_B` up | B | B | B |
+| 220 | `LSFT_T(KC_A)` up | B | B | B |
+
+#### Rolling keys (ABAB) :id=rolling-keys
+
+| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
+|------|--------------------|----------------|-------------------|----------------------------|
+| 0 | `LSFT_T(KC_A)` down| | | |
+| 110 | `KC_B` down | | | B |
+| 130 | `LSFT_T(KC_A)` up | ab | ab | B |
+| 140 | `KC_B` up | ab | ab | B |
+
+| Time | Physical key event |Ignore Interrupt| `PERMISSIVE_HOLD` | `HOLD_ON_OTHER_KEY_PRESS` |
+|------|--------------------|----------------|-------------------|----------------------------|
+| 0 | `LSFT_T(KC_A)` down| | | |
+| 110 | `KC_B` down | | | B |
+| 200 | `LSFT_T(KC_A)` held| B | B | B |
+| 205 | `LSFT_T(KC_A)` up | B | B | B |
+| 210 | `KC_B` up | B | B | B |
+
### Default Mode
Example sequence 1 (the `L` key is also mapped to `KC_RGHT` on layer 2):
@@ -179,8 +246,6 @@ since `SFT_T(KC_A)` is NOT held longer than the `TAPPING_TERM`.
However, the actual output would be capital `X` (`SHIFT` + `x`) due to reasons
explained under [Ignore Mod Tap Interrupt](#ignore-mod-tap-interrupt).
-
-
### Permissive Hold
The “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:
+---------------------------|--------+
```
-Normally, 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).
+Normally, 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).
However, this slightly different sequence will not be affected by the “permissive hold” mode:
@@ -235,7 +300,7 @@ However, this slightly different sequence will not be affected by the “permiss
In 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).
-?> 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.
+?> 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.
For more granular control of this feature, you can add the following to your `config.h`:
@@ -291,7 +356,7 @@ An example of a sequence that is affected by the “hold on other key press” m
Normally, 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).
-?> 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.
+?> 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.
For more granular control of this feature, you can add the following to your `config.h`:
@@ -355,26 +420,32 @@ However, if the `HOLD_ON_OTHER_KEY_PRESS` option is enabled in addition to `IGNO
For more granular control of this feature, you can add the following to your `config.h`:
```c
-#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
+#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
```
+?> This option affects *all* dual-role keys.
+
You can then add the following function to your keymap:
```c
-bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
+bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case SFT_T(KC_SPC):
// Do not force the mod-tap key press to be handled as a modifier
// if any other key was pressed while the mod-tap key is held down.
- return true;
+ return false;
default:
- // Force the mod-tap key press to be handled as a modifier if any
+ // Force the dual-role key press to be handled as a modifier if any
// other key was pressed while the mod-tap key is held down.
- return false;
+ return true;
}
}
```
+Note 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.
+
+?> `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.
+
## Quick Tap Term
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.
diff --git a/keyboards/adm42/rev4/keymaps/default/config.h b/keyboards/adm42/rev4/keymaps/default/config.h
index 4082d84a3a..abfaf9af78 100644
--- a/keyboards/adm42/rev4/keymaps/default/config.h
+++ b/keyboards/adm42/rev4/keymaps/default/config.h
@@ -1,3 +1,2 @@
#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
#define QUICK_TAP_TERM_PER_KEY
-#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
diff --git a/keyboards/adm42/rev4/keymaps/default/keymap.c b/keyboards/adm42/rev4/keymaps/default/keymap.c
index 245a3bd4de..154073beb7 100644
--- a/keyboards/adm42/rev4/keymaps/default/keymap.c
+++ b/keyboards/adm42/rev4/keymaps/default/keymap.c
@@ -93,21 +93,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
};
-bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case RC_QUT:
- return true;
- default:
+bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
+ // Special if-condition outside the switch because `RC_QUT` overlaps with
+ // the `QK_MOD_TAP ... QK_MOD_TAP_MAX` range.
+ if (keycode == RC_QUT) {
return false;
}
-}
-
-bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
- case LLS_ESC:
- case LLS_RALT:
- case LLE_ENT:
- case LLA_DEL:
+ case QK_MOD_TAP ... QK_MOD_TAP_MAX:
+ case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
return true;
default:
return false;
diff --git a/keyboards/bastardkb/scylla/keymaps/cykedev/config.h b/keyboards/bastardkb/scylla/keymaps/cykedev/config.h
index 43037350f6..6119f2738b 100644
--- a/keyboards/bastardkb/scylla/keymaps/cykedev/config.h
+++ b/keyboards/bastardkb/scylla/keymaps/cykedev/config.h
@@ -28,15 +28,12 @@
#define TAPPING_TERM 200
-// Prevent normal rollover on alphas from accidentally triggering mods.
-// #define IGNORE_MOD_TAP_INTERRUPT
-
// Enable rapid switch from tap to hold, disables double tap hold auto-repeat.
// #define QUICK_TAP_TERM 0
// Apply the modifier on keys that are tapped during a short hold of a modtap
// #define PERMISSIVE_HOLD
-#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
+#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY
-#define FORCE_NKRO \ No newline at end of file
+#define FORCE_NKRO
diff --git a/keyboards/bastardkb/scylla/keymaps/cykedev/keymap.c b/keyboards/bastardkb/scylla/keymaps/cykedev/keymap.c
index 9f497e2c14..a51f5b9d38 100644
--- a/keyboards/bastardkb/scylla/keymaps/cykedev/keymap.c
+++ b/keyboards/bastardkb/scylla/keymaps/cykedev/keymap.c
@@ -169,12 +169,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case CM_SPAR:
- return true;
- default:
- return false;
+bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
+ if (keycode == CM_SPAR) {
+ return false;
+ } else if (QK_MOD_TAP <= keycode && keycode <= QK_MOD_TAP_MAX) {
+ return true;
+ } else {
+ return false;
}
}
diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/config.h b/keyboards/converter/usb_usb/keymaps/chriskopher/config.h
index 7714f713bd..04066edc02 100644
--- a/keyboards/converter/usb_usb/keymaps/chriskopher/config.h
+++ b/keyboards/converter/usb_usb/keymaps/chriskopher/config.h
@@ -18,8 +18,7 @@
#define TAPPING_TERM 200 // Delay for tap modifiers until it is considered a hold
-#define IGNORE_MOD_TAP_INTERRUPT // Enable ignore mod tap interrupt: https://docs.qmk.fm/#/tap_hold?id=ignore-mod-tap-interrupt
-#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY // Allows configuration of ignore mod tap interrupt per key in keymap.c
+#define HOLD_ON_OTHER_KEY_PRESS_PER_KEY // Allows configuration of hold on other key press per key in keymap.c
#define COMBO_COUNT 2 // Number of defined combos
#define COMBO_TERM 20 // Delay for combo keys to be chained together
diff --git a/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c b/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c
index 4113cdc67c..76cf311462 100644
--- a/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c
+++ b/keyboards/converter/usb_usb/keymaps/chriskopher/keymap.c
@@ -174,13 +174,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
// clang-format on
-// Configure ignore mod tap interrupt per key
-bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
+// Configure hold on other key press per key
+bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
- // I don't like how mod tap interrupt feels with these keys specifically when I'm typing
+ // I don't like how ignore interrupt feels with these keys specifically when I'm typing
case LCTL_T(KC_ESC):
- return false;
- default:
return true;
+ default:
+ return false;
}
}
diff --git a/keyboards/crkbd/keymaps/snowe/config.h b/keyboards/crkbd/keymaps/snowe/config.h
index b091cd7903..57a253428b 100644
--- a/keyboards/crkbd/keymaps/snowe/config.h
+++ b/keyboards/crkbd/keymaps/snowe/config.h
@@ -57,7 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//