Prevent keyup actions if key is not already down for IE
This change now checks that a specified key is down before sending any
input events when a keyUp action is specified. This prevents spurious
events detected by the browser, events which cannot happen with an actual
user.
@@ -839,6 +839,10 @@ void InputManager::AddKeyboardInput(HWND window_handle,
return;
}
+ if (key_up && !this->IsKeyPressed(character)) {
+ return;
+ }
+
this->UpdatePressedKeys(character, !key_up);
KeyInfo key_info = this->GetKeyInfo(window_handle, character);
