mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
feat: Add global macro timing configs
Added ZMK_MACRO_DEFAULT_WAIT_MS and ZMK_MACRO_DEFAULT_TAP_MS to set global defaults for the wait-ms and tap-ms properties of macros. Also reduced the default timings for macros, since it's been reported many times that 100 ms is too slow.
This commit is contained in:
committed by
Pete Johanson
parent
11ca0098a5
commit
3eb06f137b
@@ -174,8 +174,8 @@ static const struct behavior_driver_api behavior_macro_driver_api = {
|
||||
#define MACRO_INST(n) \
|
||||
static struct behavior_macro_state behavior_macro_state_##n = {}; \
|
||||
static struct behavior_macro_config behavior_macro_config_##n = { \
|
||||
.default_wait_ms = DT_INST_PROP_OR(n, wait_ms, 100), \
|
||||
.default_tap_ms = DT_INST_PROP_OR(n, tap_ms, 100), \
|
||||
.default_wait_ms = DT_INST_PROP_OR(n, wait_ms, CONFIG_ZMK_MACRO_DEFAULT_WAIT_MS), \
|
||||
.default_tap_ms = DT_INST_PROP_OR(n, tap_ms, CONFIG_ZMK_MACRO_DEFAULT_TAP_MS), \
|
||||
.count = DT_INST_PROP_LEN(n, bindings), \
|
||||
.bindings = TRANSFORMED_BEHAVIORS(n)}; \
|
||||
DEVICE_DT_INST_DEFINE(n, behavior_macro_init, NULL, &behavior_macro_state_##n, \
|
||||
|
||||
Reference in New Issue
Block a user