diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-12-19 18:54:43 +0100 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-12-19 14:11:53 -0500 |
commit | 3c2227ceed58cc64e61fc1ad7455cfd522fcd65a (patch) | |
tree | 2a3436f83d034dab4c1f18ad3c7285c69098706b /Userland/Games | |
parent | 89c6d41e9c7886fe56550a721671c848b7d4dbb4 (diff) | |
download | serenity-3c2227ceed58cc64e61fc1ad7455cfd522fcd65a.zip |
Snake: Ignore default keydown events
Before this patch, all key down events except arrow keys or WASD were
not propagated, so keyboard shortcuts in the application didn't work.
This patch fixes this :))
Diffstat (limited to 'Userland/Games')
-rw-r--r-- | Userland/Games/Snake/SnakeGame.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Games/Snake/SnakeGame.cpp b/Userland/Games/Snake/SnakeGame.cpp index af6a2e2e3b..2e43a9d531 100644 --- a/Userland/Games/Snake/SnakeGame.cpp +++ b/Userland/Games/Snake/SnakeGame.cpp @@ -212,6 +212,7 @@ void SnakeGame::keydown_event(GUI::KeyEvent& event) queue_velocity(1, 0); break; default: + event.ignore(); break; } } |