Only consider the workaround if both shift buttons are pressed.
This commit is contained in:
parent
7cb0207eef
commit
849511784b
|
@ -70,11 +70,10 @@ final class WindowsKeyboard {
|
||||||
// Windows will not send an up event for the first button that was released in this case.
|
// Windows will not send an up event for the first button that was released in this case.
|
||||||
// There will only be one up event, for the last button only. We handle this problem
|
// There will only be one up event, for the last button only. We handle this problem
|
||||||
// here, using asynchronous state queries.
|
// here, using asynchronous state queries.
|
||||||
if ( isKeyDown(Keyboard.KEY_LSHIFT) && !isKeyPressedAsync(WindowsKeycodes.VK_LSHIFT) )
|
if ( isKeyDown(Keyboard.KEY_LSHIFT) && isKeyDown(Keyboard.KEY_RSHIFT) ) {
|
||||||
handleKey(WindowsKeycodes.VK_SHIFT, Keyboard.KEY_LSHIFT, false, (byte)0, 0L, false);
|
if ( !isKeyPressedAsync(WindowsKeycodes.VK_LSHIFT) ) handleKey(WindowsKeycodes.VK_SHIFT, Keyboard.KEY_LSHIFT, false, (byte)0, 0L, false);
|
||||||
|
if ( !isKeyPressedAsync(WindowsKeycodes.VK_RSHIFT) ) handleKey(WindowsKeycodes.VK_SHIFT, Keyboard.KEY_RSHIFT, false, (byte)0, 0L, false);
|
||||||
if ( isKeyDown(Keyboard.KEY_RSHIFT) && !isKeyPressedAsync(WindowsKeycodes.VK_RSHIFT) )
|
}
|
||||||
handleKey(WindowsKeycodes.VK_SHIFT, Keyboard.KEY_RSHIFT, false, (byte)0, 0L, false);
|
|
||||||
|
|
||||||
int old_position = keyDownBuffer.position();
|
int old_position = keyDownBuffer.position();
|
||||||
keyDownBuffer.put(key_down_buffer);
|
keyDownBuffer.put(key_down_buffer);
|
||||||
|
|
Loading…
Reference in New Issue