From e7a6e4016d757d37f0b8df28d7b78f38554e0b27 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sat, 29 Oct 2022 23:17:12 -0500 Subject: feat(behaviors): Add key position to key events Extended the virtual key position system from combos so that each sensor also gets a virtual key position. This allows sensor behaviors to use the behavior queue API. --- app/src/behaviors/behavior_sensor_rotate_key_press.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/src/behaviors') diff --git a/app/src/behaviors/behavior_sensor_rotate_key_press.c b/app/src/behaviors/behavior_sensor_rotate_key_press.c index ed6eedae9d..72e33ea46b 100644 --- a/app/src/behaviors/behavior_sensor_rotate_key_press.c +++ b/app/src/behaviors/behavior_sensor_rotate_key_press.c @@ -21,7 +21,8 @@ LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL); static int behavior_sensor_rotate_key_press_init(const struct device *dev) { return 0; }; static int on_sensor_binding_triggered(struct zmk_behavior_binding *binding, - const struct device *sensor, int64_t timestamp) { + const struct device *sensor, uint32_t virtual_key_position, + int64_t timestamp) { struct sensor_value value; int err; uint32_t keycode; -- cgit v1.2.3