forked from kofal.net/zmk
refactor(behaviors)!: Remove labels from behaviors
Removed the label property from built-in behaviors, custom behaviors defined in a few keymaps, and macros generated with ZMK_MACRO(). Now that node names are used to identify behaviors, and names only need to be unique within the set of behaviors, the names of all behaviors have been shortened to be similar to their original labels. This means that any keymaps which reference behavior nodes by name instead of by label will need to be updated. Keymaps typically use the labels though, so most keymaps should be unaffected by this change.
This commit is contained in:
@@ -24,6 +24,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)
|
||||
|
||||
#define KEY_PRESS DEVICE_DT_NAME(DT_INST(0, zmk_behavior_key_press))
|
||||
|
||||
#define ZMK_BHV_STICKY_KEY_MAX_HELD 10
|
||||
|
||||
#define ZMK_BHV_STICKY_KEY_POSITION_FREE UINT32_MAX
|
||||
@@ -202,7 +204,7 @@ static int sticky_key_keycode_state_changed_listener(const zmk_event_t *eh) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strcmp(sticky_key->config->behavior.behavior_dev, "KEY_PRESS") == 0 &&
|
||||
if (strcmp(sticky_key->config->behavior.behavior_dev, KEY_PRESS) == 0 &&
|
||||
ZMK_HID_USAGE_ID(sticky_key->param1) == ev_copy.keycode &&
|
||||
ZMK_HID_USAGE_PAGE(sticky_key->param1) == ev_copy.usage_page &&
|
||||
SELECT_MODS(sticky_key->param1) == ev_copy.implicit_modifiers) {
|
||||
|
||||
Reference in New Issue
Block a user