diff --git a/input_dev.c b/input_dev.c index b2a9a5e..be0bf26 100644 --- a/input_dev.c +++ b/input_dev.c @@ -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; } }