forked from kofal.net/zmk
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:
committed by
Pete Johanson
parent
83a151890c
commit
e7a6e4016d
@@ -19,6 +19,7 @@
|
||||
#include <zmk/hid.h>
|
||||
#include <zmk/matrix.h>
|
||||
#include <zmk/keymap.h>
|
||||
#include <zmk/virtual_key_position.h>
|
||||
|
||||
LOG_MODULE_DECLARE(zmk, CONFIG_ZMK_LOG_LEVEL);
|
||||
|
||||
@@ -476,7 +477,7 @@ ZMK_SUBSCRIPTION(combo, zmk_position_state_changed);
|
||||
.key_positions = DT_PROP(n, key_positions), \
|
||||
.key_position_len = DT_PROP_LEN(n, key_positions), \
|
||||
.behavior = ZMK_KEYMAP_EXTRACT_BINDING(0, n), \
|
||||
.virtual_key_position = ZMK_KEYMAP_LEN + __COUNTER__, \
|
||||
.virtual_key_position = ZMK_VIRTUAL_KEY_POSITION_COMBO(__COUNTER__), \
|
||||
.slow_release = DT_PROP(n, slow_release), \
|
||||
.layers = DT_PROP(n, layers), \
|
||||
.layers_len = DT_PROP_LEN(n, layers), \
|
||||
|
||||
Reference in New Issue
Block a user