Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix keys scrolling stuck (+ some function double calls) #13115
After each pressed hotkey for saving viewport bookmark or jumping to bookmark/edge, it was executed twice.
referenced this pull request
Apr 12, 2017
Confirmed that this fixes the sticky scroll bug, although it does feel a bit jarring to have it stop when pressing shift while scrolling. My repro case is to press down an arrow key, press shift, release arrow, release shift.
Anyone trying to test the keydown/keyup change for bookmarks should beware the keyrepeat.
Code looks good, just one minor code style nit:
isn't clear to me. Shift+Up doesn't scroll before/now. Up + shift..... does not stop scrolling. Nobody will use Ctrlkey + a key to scroll, so we could support only single keys for scrolling and ignore control keys so also Shift+Up would scroll.
Up+Shift does stop scrolling ingame.
[15:00:37] <Phrohdoh> Is #13115 supposed to fix the issue where you hold an arrow, open a menu (esc for example), release the arrow, close the menu and the game continues to scroll? [15:00:37] <orabot> Pull request #13115 (open) by rob-v: Fix frozen scrolling (+ some function double calls) #13111 #2075 | http://bugs.openra.net/13115 [15:00:48] <pchote> yeah [15:00:58] <Phrohdoh> I just reprod that [15:01:05] <pchote> maybe not the menu case, but it definitely fixes the modifier case
LGTM so long as this wasn't intended to fix ^.
On Windows Up+Shift does not stop scrolling in current release and also in this PR. The behaviour of Up+Shift wasn't changed. I wonder how it works in Linux.
I don't know if it should stop or not. Because when I try to hold 'a' in notepad(++) or OpenRA Text field it stops writing on Shift press. so the standard behaviour seems to 'stop', but it doesn't in OpenRA ingame scrolling on Windows, anyway this behaviour wasn't changed by this PR.