feat(pointing): Allow peripheral input processing to stop propagation (#2844)

Allow peripheral input processors to prevent event propagation to centrals.

---------

Co-authored-by: Pete Johanson <peter@peterjohanson.com>
This commit is contained in:
badjeff 2025-06-16 14:23:25 +08:00 committed by GitHub
parent eb99b4ede0
commit 462d48b78e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -56,8 +56,12 @@ int zmk_input_split_report_peripheral_event(uint8_t reg, uint8_t type, uint16_t
"Peripheral input splits need an `input` property set"); \
void split_input_handler_##n(struct input_event *evt) { \
for (size_t i = 0; i < ARRAY_SIZE(processors_##n); i++) { \
zmk_input_processor_handle_event(processors_##n[i].dev, evt, processors_##n[i].param1, \
processors_##n[i].param2, NULL); \
int ret = zmk_input_processor_handle_event(processors_##n[i].dev, evt, \
processors_##n[i].param1, \
processors_##n[i].param2, NULL); \
if (ret != ZMK_INPUT_PROC_CONTINUE) { \
return; \
} \
} \
struct zmk_split_transport_peripheral_event ev = { \
.type = ZMK_SPLIT_TRANSPORT_PERIPHERAL_EVENT_TYPE_INPUT_EVENT, \