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.
This commit is contained in:
parent
83a151890c
commit
e7a6e4016d
6 changed files with 44 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue