From e9d08fadf280e90fb259e1208a2119122b315a0c Mon Sep 17 00:00:00 2001 From: Jeff Leung Date: Tue, 18 Feb 2025 03:56:49 +0800 Subject: [PATCH 1/2] feat(pointing): Allow input processor terminate before sending events to central from split periperal --- app/src/pointing/input_split.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/pointing/input_split.c b/app/src/pointing/input_split.c index 55a84ea4624..f07aa52ba79 100644 --- a/app/src/pointing/input_split.c +++ b/app/src/pointing/input_split.c @@ -56,8 +56,10 @@ 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) { continue; } else { return; } \ } \ zmk_split_bt_report_input(DT_INST_REG_ADDR(n), evt->type, evt->code, evt->value, \ evt->sync); \ From 2ed4f87f9ba3cfe1fc202c119cb8fcc30bb22d91 Mon Sep 17 00:00:00 2001 From: badjeff Date: Fri, 28 Feb 2025 15:46:18 +0800 Subject: [PATCH 2/2] Update app/src/pointing/input_split.c Co-authored-by: Pete Johanson --- app/src/pointing/input_split.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/pointing/input_split.c b/app/src/pointing/input_split.c index f07aa52ba79..bf9fb06c854 100644 --- a/app/src/pointing/input_split.c +++ b/app/src/pointing/input_split.c @@ -59,7 +59,7 @@ int zmk_input_split_report_peripheral_event(uint8_t reg, uint8_t type, uint16_t 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) { continue; } else { return; } \ + if (ret != ZMK_INPUT_PROC_CONTINUE) { return; } \ } \ zmk_split_bt_report_input(DT_INST_REG_ADDR(n), evt->type, evt->code, evt->value, \ evt->sync); \