aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/src/pointing/input_processor_scaler.c
diff options
context:
space:
mode:
authorPete Johanson <[email protected]>2024-12-17 18:50:06 -0700
committerGitHub <[email protected]>2024-12-17 20:50:06 -0500
commitcb867f92dbe4e32675c2137fc6aa914a44ecc8dc (patch)
tree84ed7a733e5de6d00b3129d3c76f917e250f7095 /app/src/pointing/input_processor_scaler.c
parentd0016b34f88b76bd0c1fb5964bbae9d1916dcf76 (diff)
downloadzmk-cb867f92dbe4e32675c2137fc6aa914a44ecc8dc.tar.gz
zmk-cb867f92dbe4e32675c2137fc6aa914a44ecc8dc.zip
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 <[email protected]> Co-authored-by: Cem Aksoylar <[email protected]>
Diffstat (limited to 'app/src/pointing/input_processor_scaler.c')
-rw-r--r--app/src/pointing/input_processor_scaler.c4
1 files changed, 2 insertions, 2 deletions
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 = {