mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
LibGUI: Handle KeyDown when checking for Key_Escape in Dialog too
This makes 'escaping' the dialogs seem bit faster :^) It also follows what RunWindow and probably others do.
This commit is contained in:
parent
d8ff46594a
commit
62c5a5351c
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ void Dialog::done(int result)
|
|||
|
||||
void Dialog::event(Core::Event& event)
|
||||
{
|
||||
if (event.type() == Event::KeyUp) {
|
||||
if (event.type() == Event::KeyUp || event.type() == Event::KeyDown) {
|
||||
auto& key_event = static_cast<KeyEvent&>(event);
|
||||
if (key_event.key() == KeyCode::Key_Escape) {
|
||||
done(ExecCancel);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue