summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2022-12-14 15:45:07 +0000
committerLinus Groh <mail@linusgroh.de>2022-12-14 18:25:02 +0000
commit10c4c552e7675c520b691ddf815249e44b76d401 (patch)
tree5967e46712ff9590d86136e2d90255a25df41394
parentfaf30ed9ef54f19442498a65aa9a87738260b8b3 (diff)
downloadserenity-10c4c552e7675c520b691ddf815249e44b76d401.zip
Hearts: Ignore unhandled keydown events
This makes Action shortcuts work again. :^)
-rw-r--r--Userland/Games/Hearts/Game.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Userland/Games/Hearts/Game.cpp b/Userland/Games/Hearts/Game.cpp
index 84043a5304..c62dc48858 100644
--- a/Userland/Games/Hearts/Game.cpp
+++ b/Userland/Games/Hearts/Game.cpp
@@ -580,8 +580,11 @@ void Game::keydown_event(GUI::KeyEvent& event)
} else if (event.key() == KeyCode::Key_Space) {
if (m_human_can_play && m_state == State::Play)
play_card(m_players[0], pick_first_card_ltr(m_players[0]));
- } else if (event.shift() && event.key() == KeyCode::Key_F11)
+ } else if (event.shift() && event.key() == KeyCode::Key_F11) {
dump_state();
+ } else {
+ event.ignore();
+ }
}
void Game::play_card(Player& player, size_t card_index)