Skip to content

Change exit keybinding and fix bug in allow_close[] #16071

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Some can be changed in the key config dialog in the settings tab.
| T | Chat |
| / | Command |
| Esc | Pause menu/abort/exit (pauses only singleplayer game) |
| Ctrl + Esc | Exit directly to main menu from anywhere, bypassing pause menu |
| Shift + Esc | Exit directly to main menu from anywhere, bypassing pause menu |
| + | Increase view range |
| - | Decrease view range |
| K | Enable/disable fly mode (needs fly privilege) |
Expand Down
2 changes: 1 addition & 1 deletion src/client/inputhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ bool MyEventReceiver::OnEvent(const SEvent &event)
fullscreen_is_down = event.KeyInput.PressedDown;
return true;
} else if (keyCode == EscapeKey &&
event.KeyInput.PressedDown && event.KeyInput.Control) {
event.KeyInput.PressedDown && event.KeyInput.Shift) {
g_gamecallback->disconnect();
return true;
}
Expand Down
3 changes: 3 additions & 0 deletions src/gui/guiFormSpecMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,10 @@ class GUIFormSpecMenu : public GUIModalMenu

void defaultAllowClose(bool value)
{
// Also set m_allowclose here in order to have the correct value if
// escape is pressed before regenerateGui() is called.
m_default_allowclose = value;
m_allowclose = value;
}

void setDebugView(bool value)
Expand Down
Loading