mirror of https://github.com/zmkfirmware/zmk.git
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:
parent
3099de4e2a
commit
fa86b39aa8
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue