Fix mouse mode

This commit is contained in:
Denis 2023-11-13 21:53:01 +01:00
parent ffdbf18592
commit 448e89dd81
No known key found for this signature in database
GPG key ID: DD9B63F805CF5C03

View file

@ -40,11 +40,11 @@ uint32_t input_filter_asus_kb(struct input_event* events, size_t* size, uint32_t
if (events[0].type == EV_REL) {
return INPUT_FILTER_FLAGS_MOUSE;
} else if (events[0].type == EV_KEY) {
} else if ((events[0].type == EV_KEY) || (events[1].type == EV_KEY)) {
if ((events[0].code == BTN_MIDDLE) || (events[0].code == BTN_LEFT) || (events[0].code == BTN_RIGHT)) {
return INPUT_FILTER_FLAGS_MOUSE;
return INPUT_FILTER_FLAGS_PRESERVE_TIME | INPUT_FILTER_FLAGS_MOUSE;
} else if ((events[1].code == BTN_MIDDLE) || (events[1].code == BTN_LEFT) || (events[1].code == BTN_RIGHT)) {
return INPUT_FILTER_FLAGS_MOUSE;
return INPUT_FILTER_FLAGS_PRESERVE_TIME | INPUT_FILTER_FLAGS_MOUSE;
}
}