From 8740a8c056e22998c9722933ab5a4e782b8f13b6 Mon Sep 17 00:00:00 2001 From: Hugh Davenport Date: Thu, 4 Jan 2024 16:58:29 +1300 Subject: [PATCH] FlappyBug: Allow shortcuts for quitting and help As the menus show that ALT-F4 quit and F1 brings up help, we should make the application do that instead of just undocumented ESC --- Userland/Games/FlappyBug/Game.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Games/FlappyBug/Game.cpp b/Userland/Games/FlappyBug/Game.cpp index 9e5e3d67d9..b7316b36e4 100644 --- a/Userland/Games/FlappyBug/Game.cpp +++ b/Userland/Games/FlappyBug/Game.cpp @@ -82,14 +82,14 @@ void Game::paint_event(GUI::PaintEvent& event) void Game::keydown_event(GUI::KeyEvent& event) { - // FIXME: After #22573 is merged, then remove the case for F11 below and ensure it is in this check here which also checks for modifiers + if (event.modifiers() || event.key() == Key_F1 || event.key() == Key_F11) { + event.ignore(); + return; + } switch (event.key()) { case Key_Escape: GUI::Application::the()->quit(); break; - case Key_F11: - event.ignore(); - break; default: player_input(); break;