Skip to content

Commit f20e6ea

Browse files
authored
fix(behaviors): Proper comma separated device list (#2850)
Properly generate the comma separated list of devs in caps word/ key repeat.
1 parent fadafc7 commit f20e6ea

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/src/behaviors/behavior_caps_word.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ static int caps_word_keycode_state_changed_listener(const zmk_event_t *eh);
8484
ZMK_LISTENER(behavior_caps_word, caps_word_keycode_state_changed_listener);
8585
ZMK_SUBSCRIPTION(behavior_caps_word, zmk_keycode_state_changed);
8686

87-
static const struct device *devs[] = {DT_INST_FOREACH_STATUS_OKAY(DEVICE_DT_INST_GET)};
87+
#define GET_DEV(inst) DEVICE_DT_INST_GET(inst),
88+
static const struct device *devs[] = {DT_INST_FOREACH_STATUS_OKAY(GET_DEV)};
8889

8990
static bool caps_word_is_caps_includelist(const struct behavior_caps_word_config *config,
9091
uint16_t usage_page, uint8_t usage_id,

app/src/behaviors/behavior_key_repeat.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ static int key_repeat_keycode_state_changed_listener(const zmk_event_t *eh);
7777
ZMK_LISTENER(behavior_key_repeat, key_repeat_keycode_state_changed_listener);
7878
ZMK_SUBSCRIPTION(behavior_key_repeat, zmk_keycode_state_changed);
7979

80-
static const struct device *devs[] = {DT_INST_FOREACH_STATUS_OKAY(DEVICE_DT_INST_GET)};
80+
#define GET_DEV(inst) DEVICE_DT_INST_GET(inst),
81+
static const struct device *devs[] = {DT_INST_FOREACH_STATUS_OKAY(GET_DEV)};
8182

8283
static int key_repeat_keycode_state_changed_listener(const zmk_event_t *eh) {
8384
struct zmk_keycode_state_changed *ev = as_zmk_keycode_state_changed(eh);

0 commit comments

Comments
 (0)