From 91cdda776347a522bb2fc02a11ee8d5a2fcae78e Mon Sep 17 00:00:00 2001 From: Hugh Davenport Date: Thu, 4 Jan 2024 16:57:08 +1300 Subject: [PATCH] Calculator: Allow system shortcuts Before the key events for shortcuts such as ALT-F4 did not work as the widget was swallowing up the shortcut. This changes ignores the event if nothing else matched --- Userland/Applications/Calculator/CalculatorWidget.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Applications/Calculator/CalculatorWidget.cpp b/Userland/Applications/Calculator/CalculatorWidget.cpp index 266f5440fa..a9b320c7da 100644 --- a/Userland/Applications/Calculator/CalculatorWidget.cpp +++ b/Userland/Applications/Calculator/CalculatorWidget.cpp @@ -184,6 +184,8 @@ void CalculatorWidget::keydown_event(GUI::KeyEvent& event) m_divide_button->click(); else if (event.code_point() == '%') m_percent_button->click(); + else + event.ignore(); update_display(); }