diff --git a/src/java/org/lwjgl/opengl/WindowsKeyboard.java b/src/java/org/lwjgl/opengl/WindowsKeyboard.java index 3ff3ea35..8365e5a8 100644 --- a/src/java/org/lwjgl/opengl/WindowsKeyboard.java +++ b/src/java/org/lwjgl/opengl/WindowsKeyboard.java @@ -70,11 +70,10 @@ final class WindowsKeyboard { // 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 // here, using asynchronous state queries. - if ( isKeyDown(Keyboard.KEY_LSHIFT) && !isKeyPressedAsync(WindowsKeycodes.VK_LSHIFT) ) - handleKey(WindowsKeycodes.VK_SHIFT, Keyboard.KEY_LSHIFT, 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); + if ( isKeyDown(Keyboard.KEY_LSHIFT) && isKeyDown(Keyboard.KEY_RSHIFT) ) { + 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); + } int old_position = keyDownBuffer.position(); keyDownBuffer.put(key_down_buffer);