feat(pointing): Handle INPUT_BTN_TOUCH codes for mouse buttons

Translate INPUT_BTN_TOUCH input codes into button 0 press/release for
HID layer.
This commit is contained in:
Peter Johanson 2025-10-28 17:01:18 -06:00
parent 3099de4e2a
commit fa86b39aa8
1 changed files with 8 additions and 0 deletions

View File

@ -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: