summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknolax <1339802534.kk@gmail.com>2017-12-29 19:28:49 -0500
committerknolax <1339802534.kk@gmail.com>2017-12-29 19:28:49 -0500
commit476a9e85e5309c07d5b8bacb55b8c4b8eca275e7 (patch)
tree007854abdfcf4c687db51f27b118ea4e6ac49ba6
parenta2a7643c74c5827761295a691ac61af6adb1cc24 (diff)
added an event of rel 0 for the mouse controls, so it doesn't just keep going until key release
-rw-r--r--skey.c12
1 files changed, 12 insertions, 0 deletions
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;
}