From 462d48b78edac8bedb75666699ea4fa446d2152c Mon Sep 17 00:00:00 2001 From: badjeff Date: Mon, 16 Jun 2025 14:23:25 +0800 Subject: [PATCH] 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 --- app/src/pointing/input_split.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/pointing/input_split.c b/app/src/pointing/input_split.c index b08d7ac70..615790a09 100644 --- a/app/src/pointing/input_split.c +++ b/app/src/pointing/input_split.c @@ -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, \