Skip to content

Commit 233ffbe

Browse files
authored
Change exit keybinding and fix bug in allow_close[]
1 parent d6d045a commit 233ffbe

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Some can be changed in the key config dialog in the settings tab.
5757
| T | Chat |
5858
| / | Command |
5959
| Esc | Pause menu/abort/exit (pauses only singleplayer game) |
60-
| Ctrl + Esc | Exit directly to main menu from anywhere, bypassing pause menu |
60+
| Shift + Esc | Exit directly to main menu from anywhere, bypassing pause menu |
6161
| + | Increase view range |
6262
| - | Decrease view range |
6363
| K | Enable/disable fly mode (needs fly privilege) |

src/client/inputhandler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ bool MyEventReceiver::OnEvent(const SEvent &event)
151151
fullscreen_is_down = event.KeyInput.PressedDown;
152152
return true;
153153
} else if (keyCode == EscapeKey &&
154-
event.KeyInput.PressedDown && event.KeyInput.Control) {
154+
event.KeyInput.PressedDown && event.KeyInput.Shift) {
155155
g_gamecallback->disconnect();
156156
return true;
157157
}

src/gui/guiFormSpecMenu.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ class GUIFormSpecMenu : public GUIModalMenu
206206

207207
void defaultAllowClose(bool value)
208208
{
209+
// Also set m_allowclose here in order to have the correct value if
210+
// escape is pressed before regenerateGui() is called.
209211
m_default_allowclose = value;
212+
m_allowclose = value;
210213
}
211214

212215
void setDebugView(bool value)

0 commit comments

Comments
 (0)