Rename COMBO_ADD_ON to COMBO_HOOK
This commit is contained in:
parent
2c4a96c22c
commit
936464e948
4 changed files with 22 additions and 10 deletions
|
@ -5,6 +5,7 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST"
|
||||||
* sticky-hold swallows OS shift when typing quickly, using sticky-tap for now
|
* sticky-hold swallows OS shift when typing quickly, using sticky-tap for now
|
||||||
* native sleep key doesn't work with windows (#1077), using sleep-macro for now
|
* native sleep key doesn't work with windows (#1077), using sleep-macro for now
|
||||||
* invalid DFU suffix signature warning when flashing with dfu-util
|
* invalid DFU suffix signature warning when flashing with dfu-util
|
||||||
|
* todo: num_word: momentary shift to number layer, auto-cancel on everything that's not a number
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <behaviors.dtsi>
|
#include <behaviors.dtsi>
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
╰─────────────╯ ╰─────────────╯ */
|
╰─────────────╯ ╰─────────────╯ */
|
||||||
|
|
||||||
// use global-quick-tap-ms for combos (requires PR 1387)
|
// use global-quick-tap-ms for combos (requires PR 1387)
|
||||||
#undef COMBO_ADD_ON
|
#undef COMBO_HOOK
|
||||||
#define COMBO_ADD_ON global-quick-tap-ms = <150>;
|
#define COMBO_HOOK global-quick-tap-ms = <125>;
|
||||||
|
|
||||||
#define COMBO_TERM_FAST 20
|
#define COMBO_TERM_FAST 20
|
||||||
#define COMBO_TERM_SLOW 35
|
#define COMBO_TERM_SLOW 35
|
||||||
|
|
|
@ -147,9 +147,12 @@ ZMK_KEYMAP(default_layer,
|
||||||
two layers). If set to `ALL` the combo is active on all layers.
|
two layers). If set to `ALL` the combo is active on all layers.
|
||||||
|
|
||||||
By default, the timeout for combos created with `ZMK_COMBO` is 30ms. If `COMBO_TERM` is
|
By default, the timeout for combos created with `ZMK_COMBO` is 30ms. If `COMBO_TERM` is
|
||||||
reset prior to calling `ZMK_COMBO`, the new value of `COMBO_TERM` is used instead. Note: while
|
reset prior to calling `ZMK_COMBO`, the new value of `COMBO_TERM` is used instead.
|
||||||
it is possible to set different timeouts for different combos, this is known to cause
|
Alternatively, one can use `ZMK_COMBO_ADV` which allows to specify the combo-timeout directly
|
||||||
[issues](https://github.com/zmkfirmware/zmk/issues/905) with overlapping combos and should be avoided.
|
as 5th argument.
|
||||||
|
|
||||||
|
Note: with older ZMK versions, using different combo-timeouts would result in keys
|
||||||
|
getting stuck. If this is an issue, try updating to the latest ZMK version.
|
||||||
|
|
||||||
#### Example: copy and paste combos
|
#### Example: copy and paste combos
|
||||||
|
|
||||||
|
@ -369,8 +372,16 @@ ZMK_BEHAVIOR(hmr, hold_tap, // right-hand HRMs
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
* 7/31/2022: Switch unicode dependency from PR #1114 to
|
* **8/05/2022:** New combo macro `ZMK_COMBO_ADV` for "advanced" combo setups. Compared
|
||||||
[#1412](https://github.com/zmkfirmware/zmk/pull/1412)
|
to the regular `ZMK_COMBO` macro, it takes the combo-timeout as fifth argument.
|
||||||
|
Moreover, if `COMBO_HOOK` is defined, it includes its definition as additional
|
||||||
|
options. For example, to use the new global-quick-tap for combos option introduced in
|
||||||
|
[PR #1387](https://github.com/andrewjrae/zmk/tree/min-prior-ms), one would set
|
||||||
|
`#define COMBO_HOOK global-quick-tap-ms = <125>;` before calling `ZMK_COMBO_ADV`.
|
||||||
|
See [my personal combo
|
||||||
|
setup](https://github.com/urob/zmk-config/blob/main/config/combos.dtsi) for examples.
|
||||||
|
* **7/31/2022:** Switch unicode dependency from PR #1114 to
|
||||||
|
[PR #1412](https://github.com/zmkfirmware/zmk/pull/1412)
|
||||||
|
|
||||||
|
|
||||||
[^1]: The default for Windows is `OS_UNICODE_LEAD` set to tap <kbd>Right Alt</kbd>
|
[^1]: The default for Windows is `OS_UNICODE_LEAD` set to tap <kbd>Right Alt</kbd>
|
||||||
|
|
|
@ -62,8 +62,8 @@
|
||||||
}; \
|
}; \
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined COMBO_ADD_ON
|
#if !defined COMBO_HOOK
|
||||||
#define COMBO_ADD_ON
|
#define COMBO_HOOK
|
||||||
#endif
|
#endif
|
||||||
#define ZMK_COMBO_ADV(name, combo_bindings, keypos, combo_layers, combo_timeout) \
|
#define ZMK_COMBO_ADV(name, combo_bindings, keypos, combo_layers, combo_timeout) \
|
||||||
/ { \
|
/ { \
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
bindings = <combo_bindings>; \
|
bindings = <combo_bindings>; \
|
||||||
key-positions = <keypos>; \
|
key-positions = <keypos>; \
|
||||||
layers = <combo_layers>; \
|
layers = <combo_layers>; \
|
||||||
COMBO_ADD_ON \
|
COMBO_HOOK \
|
||||||
}; \
|
}; \
|
||||||
}; \
|
}; \
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue