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:
@@ -13,6 +13,9 @@
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/input/input.h>
|
||||
|
||||
#define ZMK_INPUT_PROC_CONTINUE 0
|
||||
#define ZMK_INPUT_PROC_STOP 1
|
||||
|
||||
struct zmk_input_processor_entry {
|
||||
const struct device *dev;
|
||||
uint32_t param1;
|
||||
@@ -33,6 +36,7 @@ struct zmk_input_processor_entry {
|
||||
}
|
||||
|
||||
struct zmk_input_processor_state {
|
||||
uint8_t input_device_index;
|
||||
int16_t *remainder;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user