From 476a9e85e5309c07d5b8bacb55b8c4b8eca275e7 Mon Sep 17 00:00:00 2001 From: knolax <1339802534.kk@gmail.com> Date: Fri, 29 Dec 2017 19:28:49 -0500 Subject: added an event of rel 0 for the mouse controls, so it doesn't just keep going until key release --- skey.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/skey.c b/skey.c index c3f8e22..0440c19 100644 --- a/skey.c +++ b/skey.c @@ -230,31 +230,43 @@ int processkey(int row, int column, int state) { case MS_UP: input_event(skey_dev, EV_REL, REL_Y, -MOUSE_DIST); input_sync(skey_dev); + input_event(skey_dev, EV_REL, REL_Y, 0); + input_sync(skey_dev); return 0; break; case MS_DOWN: input_event(skey_dev, EV_REL, REL_Y, +MOUSE_DIST); input_sync(skey_dev); + input_event(skey_dev, EV_REL, REL_Y, 0); + input_sync(skey_dev); return 0; break; case MS_LEFT: input_event(skey_dev, EV_REL, REL_X, -MOUSE_DIST); input_sync(skey_dev); + input_event(skey_dev, EV_REL, REL_X, 0); + input_sync(skey_dev); return 0; break; case MS_RIGHT: input_event(skey_dev, EV_REL, REL_X, +MOUSE_DIST); input_sync(skey_dev); + input_event(skey_dev, EV_REL, REL_X, 0); + input_sync(skey_dev); return 0; break; case MS_SCRL_UP: input_event(skey_dev, EV_REL, REL_WHEEL, +WHEEL_DIST); input_sync(skey_dev); + input_event(skey_dev, EV_REL, REL_WHEEL, 0); + input_sync(skey_dev); return 0; break; case MS_SCRL_DOWN: input_event(skey_dev, EV_REL, REL_WHEEL, -WHEEL_DIST); input_sync(skey_dev); + input_event(skey_dev, EV_REL, REL_WHEEL, 0); + input_sync(skey_dev); return 0; break; } -- cgit v1.1