mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 04:35:07 +00:00
LibGUI: Only activate keyboard shortcuts on KeyDown, not KeyUp.
This commit is contained in:
parent
1e0971c8b4
commit
77359a5360
1 changed files with 5 additions and 3 deletions
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue