From 448e89dd819463db55310205f2b87da01afaae38 Mon Sep 17 00:00:00 2001 From: Denis Date: Mon, 13 Nov 2023 21:53:01 +0100 Subject: [PATCH] Fix mouse mode --- input_dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } }