From fa86b39aa85aa483328dda50763e3512cbec3d2d Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Tue, 28 Oct 2025 17:01:18 -0600 Subject: [PATCH] feat(pointing): Handle INPUT_BTN_TOUCH codes for mouse buttons Translate INPUT_BTN_TOUCH input codes into button 0 press/release for HID layer. --- app/src/pointing/input_listener.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/pointing/input_listener.c b/app/src/pointing/input_listener.c index 2c293332f..431d9a746 100644 --- a/app/src/pointing/input_listener.c +++ b/app/src/pointing/input_listener.c @@ -128,6 +128,14 @@ static void handle_key_code(const struct input_listener_config *config, int8_t btn; switch (evt->code) { + case INPUT_BTN_TOUCH: + btn = 0; + if (evt->value > 0) { + WRITE_BIT(data->mouse.button_set, btn, 1); + } else { + WRITE_BIT(data->mouse.button_clear, btn, 1); + } + break; case INPUT_BTN_0: case INPUT_BTN_1: case INPUT_BTN_2: