From cb867f92dbe4e32675c2137fc6aa914a44ecc8dc Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Tue, 17 Dec 2024 18:50:06 -0700 Subject: Feature: input processor behavior invocation (#2714) refactor(pointing): Allow stopping event propagation Allow input processors to return a special value if a given input event should not be further processed/propagated. feat(pointing): Add behavior input processor Add the ability to intercept certain input events and trigger behaviors when they occur. Co-authored-by: Jorge Villalobos Co-authored-by: Cem Aksoylar --- app/src/pointing/input_processor_scaler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/src/pointing/input_processor_scaler.c') diff --git a/app/src/pointing/input_processor_scaler.c b/app/src/pointing/input_processor_scaler.c index eb006cd254..c7e08ecdb0 100644 --- a/app/src/pointing/input_processor_scaler.c +++ b/app/src/pointing/input_processor_scaler.c @@ -47,7 +47,7 @@ static int scaler_handle_event(const struct device *dev, struct input_event *eve const struct scaler_config *cfg = dev->config; if (event->type != cfg->type) { - return 0; + return ZMK_INPUT_PROC_CONTINUE; } for (int i = 0; i < cfg->codes_len; i++) { @@ -56,7 +56,7 @@ static int scaler_handle_event(const struct device *dev, struct input_event *eve } } - return 0; + return ZMK_INPUT_PROC_CONTINUE; } static struct zmk_input_processor_driver_api scaler_driver_api = { -- cgit v1.2.3