1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 10:55:07 +00:00

LibGUI: Only activate keyboard shortcuts on KeyDown, not KeyUp.

This commit is contained in:
Andreas Kling 2019-03-08 01:59:07 +01:00
parent 1e0971c8b4
commit 77359a5360

View file

@ -158,9 +158,11 @@ void GEventLoop::handle_key_event(const WSAPI_ServerMessage& event, GWindow& win
if (event.key.character != '\0')
key_event->m_text = String(&event.key.character, 1);
if (auto* action = GApplication::the().action_for_key_event(*key_event)) {
action->activate();
return;
if (event.type == WSAPI_ServerMessage::Type::KeyDown) {
if (auto* action = GApplication::the().action_for_key_event(*key_event)) {
action->activate();
return;
}
}
post_event(window, move(key_event));
}