summaryrefslogtreecommitdiff
path: root/Userland/Games
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-12-19 18:54:43 +0100
committerTim Flynn <trflynn89@pm.me>2022-12-19 14:11:53 -0500
commit3c2227ceed58cc64e61fc1ad7455cfd522fcd65a (patch)
tree2a3436f83d034dab4c1f18ad3c7285c69098706b /Userland/Games
parent89c6d41e9c7886fe56550a721671c848b7d4dbb4 (diff)
downloadserenity-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.cpp1
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;
}
}