mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-25 15:35:18 -05:00
refactor(behaviors): global-quick-tap -> require-prior-idle
Renaming global-quick-tap-ms to require-prior-idle.
This commit is contained in:
committed by
Pete Johanson
parent
49c393e8f8
commit
b85ffa4b6c
@@ -58,17 +58,17 @@ Definition file: [zmk/app/dts/bindings/behaviors/zmk,behavior-hold-tap.yaml](htt
|
||||
|
||||
Applies to: `compatible = "zmk,behavior-hold-tap"`
|
||||
|
||||
| Property | Type | Description | Default |
|
||||
| ---------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------ | ------------------ |
|
||||
| `label` | string | Unique label for the node | |
|
||||
| `#binding-cells` | int | Must be `<2>` | |
|
||||
| `bindings` | phandle array | A list of two behaviors (without parameters): one for hold and one for tap | |
|
||||
| `flavor` | string | Adjusts how the behavior chooses between hold and tap | `"hold-preferred"` |
|
||||
| `tapping-term-ms` | int | How long in milliseconds the key must be held to trigger a hold | |
|
||||
| `quick-tap-ms` | int | Tap twice within this period (in milliseconds) to trigger a tap, even when held | -1 (disabled) |
|
||||
| `global-quick-tap-ms` | int | Triggers a tap immediately if any non-modifier key was pressed within `global-quick-tap-ms` of the hold-tap. | -1 (disabled) |
|
||||
| `retro-tap` | bool | Triggers the tap behavior on release if no other key was pressed during a hold | false |
|
||||
| `hold-trigger-key-positions` | array | If set, pressing the hold-tap and then any key position _not_ in the list triggers a tap. | |
|
||||
| Property | Type | Description | Default |
|
||||
| ---------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------- | ------------------ |
|
||||
| `label` | string | Unique label for the node | |
|
||||
| `#binding-cells` | int | Must be `<2>` | |
|
||||
| `bindings` | phandle array | A list of two behaviors (without parameters): one for hold and one for tap | |
|
||||
| `flavor` | string | Adjusts how the behavior chooses between hold and tap | `"hold-preferred"` |
|
||||
| `tapping-term-ms` | int | How long in milliseconds the key must be held to trigger a hold | |
|
||||
| `quick-tap-ms` | int | Tap twice within this period (in milliseconds) to trigger a tap, even when held | -1 (disabled) |
|
||||
| `require-prior-idle-ms` | int | Triggers a tap immediately if any non-modifier key was pressed within `require-prior-idle-ms` of the hold-tap. | -1 (disabled) |
|
||||
| `retro-tap` | bool | Triggers the tap behavior on release if no other key was pressed during a hold | false |
|
||||
| `hold-trigger-key-positions` | array | If set, pressing the hold-tap and then any key position _not_ in the list triggers a tap. | |
|
||||
|
||||
The `flavor` property may be one of:
|
||||
|
||||
|
||||
@@ -31,13 +31,13 @@ The `zmk,combos` node itself has no properties. It should have one child node pe
|
||||
|
||||
Each child node can have the following properties:
|
||||
|
||||
| Property | Type | Description | Default |
|
||||
| --------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
||||
| `bindings` | phandle-array | A [behavior](../features/keymaps.md#behaviors) to run when the combo is triggered | |
|
||||
| `key-positions` | array | A list of key position indices for the keys which should trigger the combo | |
|
||||
| `timeout-ms` | int | All the keys in `key-positions` must be pressed within this time in milliseconds to trigger the combo | 50 |
|
||||
| `global-quick-tap-ms` | int | If any non-modifier key is pressed within `global-quick-tap-ms` before a key in the combo, the key will not be considered for the combo | -1 (disabled) |
|
||||
| `slow-release` | bool | Releases the combo when all keys are released instead of when any key is released | false |
|
||||
| `layers` | array | A list of layers on which the combo may be triggered. `-1` allows all layers. | `<-1>` |
|
||||
| Property | Type | Description | Default |
|
||||
| ----------------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------- |
|
||||
| `bindings` | phandle-array | A [behavior](../features/keymaps.md#behaviors) to run when the combo is triggered | |
|
||||
| `key-positions` | array | A list of key position indices for the keys which should trigger the combo | |
|
||||
| `timeout-ms` | int | All the keys in `key-positions` must be pressed within this time in milliseconds to trigger the combo | 50 |
|
||||
| `require-prior-idle-ms` | int | If any non-modifier key is pressed within `require-prior-idle-ms` before a key in the combo, the key will not be considered for the combo | -1 (disabled) |
|
||||
| `slow-release` | bool | Releases the combo when all keys are released instead of when any key is released | false |
|
||||
| `layers` | array | A list of layers on which the combo may be triggered. `-1` allows all layers. | `<-1>` |
|
||||
|
||||
The `key-positions` array must not be longer than the `CONFIG_ZMK_COMBO_MAX_KEYS_PER_COMBO` setting, which defaults to 4. If you want a combo that triggers when pressing 5 keys, then you must change the setting to 5.
|
||||
|
||||
Reference in New Issue
Block a user