diff options
author | knolax <1339802534.kk@gmail.com> | 2017-12-29 19:28:49 -0500 |
---|---|---|
committer | knolax <1339802534.kk@gmail.com> | 2017-12-29 19:28:49 -0500 |
commit | 476a9e85e5309c07d5b8bacb55b8c4b8eca275e7 (patch) | |
tree | 007854abdfcf4c687db51f27b118ea4e6ac49ba6 | |
parent | a2a7643c74c5827761295a691ac61af6adb1cc24 (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.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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; } |