aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src/behaviors
diff options
context:
space:
mode:
authorPeter Johanson <[email protected]>2024-07-05 15:30:44 -0600
committerPete Johanson <[email protected]>2024-07-05 15:38:04 -0600
commit8c6bda260ace119b3c22a21bdcdd6d17a83fc5eb (patch)
tree7d0916c84b60232f589bac5d649ecfb3d7589f15 /app/src/behaviors
parent3694ff85a039fa49722655b0f656219623a01d3a (diff)
downloadzmk-8c6bda260ace119b3c22a21bdcdd6d17a83fc5eb.tar.gz
zmk-8c6bda260ace119b3c22a21bdcdd6d17a83fc5eb.zip
fix: Proper behavior metadata for key repeat/toggle
Diffstat (limited to 'app/src/behaviors')
-rw-r--r--app/src/behaviors/behavior_key_repeat.c23
-rw-r--r--app/src/behaviors/behavior_key_toggle.c3
2 files changed, 2 insertions, 24 deletions
diff --git a/app/src/behaviors/behavior_key_repeat.c b/app/src/behaviors/behavior_key_repeat.c
index f2cd569f63..21343ae814 100644
--- a/app/src/behaviors/behavior_key_repeat.c
+++ b/app/src/behaviors/behavior_key_repeat.c
@@ -19,27 +19,6 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
#if DT_HAS_COMPAT_STATUS_OKAY(DT_DRV_COMPAT)
-#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA)
-
-static const struct behavior_parameter_value_metadata param_values[] = {
- {
- .display_name = "Key",
- .type = BEHAVIOR_PARAMETER_VALUE_TYPE_HID_USAGE,
- },
-};
-
-static const struct behavior_parameter_metadata_set param_metadata_set[] = {{
- .param1_values = param_values,
- .param1_values_len = ARRAY_SIZE(param_values),
-}};
-
-static const struct behavior_parameter_metadata metadata = {
- .sets_len = ARRAY_SIZE(param_metadata_set),
- .sets = param_metadata_set,
-};
-
-#endif
-
struct behavior_key_repeat_config {
uint8_t index;
uint8_t usage_pages_count;
@@ -89,7 +68,7 @@ static const struct behavior_driver_api behavior_key_repeat_driver_api = {
.binding_pressed = on_key_repeat_binding_pressed,
.binding_released = on_key_repeat_binding_released,
#if IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA)
- .parameter_metadata = &metadata,
+ .get_parameter_metadata = zmk_behavior_get_empty_param_metadata,
#endif // IS_ENABLED(CONFIG_ZMK_BEHAVIOR_METADATA)
};
diff --git a/app/src/behaviors/behavior_key_toggle.c b/app/src/behaviors/behavior_key_toggle.c
index d967af0146..72f2570b4d 100644
--- a/app/src/behaviors/behavior_key_toggle.c
+++ b/app/src/behaviors/behavior_key_toggle.c
@@ -36,8 +36,7 @@ static int on_keymap_binding_released(struct zmk_behavior_binding *binding,
static const struct behavior_parameter_value_metadata param_values[] = {
{
.display_name = "Key",
- .type = BEHAVIOR_PARAMETER_VALUE_TYPE_STANDARD,
- .standard = BEHAVIOR_PARAMETER_STANDARD_DOMAIN_HID_USAGE,
+ .type = BEHAVIOR_PARAMETER_VALUE_TYPE_HID_USAGE,
},
};