forked from kofal.net/zmk
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 <minusfive@users.noreply.github.com>
Co-authored-by: Cem Aksoylar <caksoylar@users.noreply.github.com>
This commit is contained in:
@@ -42,7 +42,7 @@ static int ipt_handle_event(const struct device *dev, struct input_event *event,
|
||||
const struct ipt_config *cfg = dev->config;
|
||||
|
||||
if (event->type != cfg->type) {
|
||||
return 0;
|
||||
return ZMK_INPUT_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
if (param1 & INPUT_TRANSFORM_XY_SWAP) {
|
||||
@@ -65,7 +65,7 @@ static int ipt_handle_event(const struct device *dev, struct input_event *event,
|
||||
event->value = -event->value;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ZMK_INPUT_PROC_CONTINUE;
|
||||
}
|
||||
|
||||
static struct zmk_input_processor_driver_api ipt_driver_api = {
|
||||
|
||||
Reference in New Issue
Block a user