summaryrefslogtreecommitdiff
path: root/src/guiInventoryMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guiInventoryMenu.cpp')
-rw-r--r--src/guiInventoryMenu.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/guiInventoryMenu.cpp b/src/guiInventoryMenu.cpp
index 786a4dd22..f90a2e959 100644
--- a/src/guiInventoryMenu.cpp
+++ b/src/guiInventoryMenu.cpp
@@ -290,12 +290,9 @@ bool GUIInventoryMenu::OnEvent(const SEvent& event)
{
if(event.EventType==EET_KEY_INPUT_EVENT)
{
- if(event.KeyInput.Key==KEY_ESCAPE && event.KeyInput.PressedDown)
- {
- quitMenu();
- return true;
- }
- if(event.KeyInput.Key==getKeySetting("keymap_inventory") && event.KeyInput.PressedDown)
+ KeyPress kp(event.KeyInput);
+ if (event.KeyInput.PressedDown && (kp == EscapeKey ||
+ kp == getKeySetting("keymap_inventory")))
{
quitMenu();
return true;