Skip to content

Reconsider Shift + Esc = "quit to mainmenu" #16201

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

Open
appgurueu opened this issue May 28, 2025 · 16 comments
Open

Reconsider Shift + Esc = "quit to mainmenu" #16201

appgurueu opened this issue May 28, 2025 · 16 comments
Labels
Discussion Issues meant for discussion of one or more proposals UI/UX

Comments

@appgurueu
Copy link
Contributor

appgurueu commented May 28, 2025

In #16071, Ctrl + Esc was changed to Shift + Esc.

The problem is that it seems users are likely to press this accidentally. On Discord, one user wrote:

I've been having an issue with the LShift+Esc keybind that shuts down your game. Whenever I want to use escape to leave a formspec I have to make sure I'm not pressing shift, however if it's a chest or something with a listring, that's kindof an unsreasonable thing to ask. Quite often the only reason I open that type of formspec is to do things with the items in the lists, the using shift for listrings has always been a habit and the shift+esc keybind is getting pretty irritating.

Personally, my little brother has also been running into this quite a few times (before learning what triggered it 😄) on fast-paced PvP servers: It's essentially the same thing, you're shift-clicking items out of an inventory, and then close it via Esc while still pressing shift; or maybe you're sneaking.

I also remember a third mention but I forgot where.

Some thoughts:

  • Should we make this configurable? (leaning towards no, feels too niche)
  • Should we choose something else which is less likely to be accidentally pressed? What?
  • How should we communicate this better in the future? This was communicated in the blog post (but interestingly, not the usually more detailed changelog?)
@appgurueu appgurueu added Discussion Issues meant for discussion of one or more proposals UI/UX labels May 28, 2025
@Wuzzy2
Copy link
Contributor

Wuzzy2 commented May 28, 2025

Okay, reading this, my immediate reaction is to reconsider or revert the current behavior. Frequent accidental quitting is a serious UX issue and it should be treated like a bug.

I believe the Shift+Esc was added to allow escaping from formspecs that disallow closing with Esc, right? Maybe restrict this keybind to work only in those formspecs, but not in others. But the usability implications of THAT idea should be playtested first, too.

@Maverick2797
Copy link

+1 for not liking being booted from a server because I didn't manage to release Shift before exiting the inventory with Escape. Perhaps holding Shift+Escape instead of a simple key-combination press (if that's possible?)

@sfan5
Copy link
Collaborator

sfan5 commented May 29, 2025

What about Alt+Esc?

@rubenwardy
Copy link
Contributor

What exactly is the point of this keybinding when desktop has alt+f4 and apps can swipe up?

@omicron1100
Copy link

Why is "Quit to Main Menu" an important feature to begin with? If a person is making a game where it's a self-contained experience, then it makes no sense to contain this as a hard-coded feature. Operating systems and window managers can quit applications just fine.

If the idea is that each "game" is an experience contained "inside Luanti", then I think giving creators the full ability to create custom menus that might override a global "escape hatch" is a design misstep. In this second case, there should always be a "global" menu outside of what the game provides, instead of a hard-coded keybind.

@Desour
Copy link
Member

Desour commented May 29, 2025

  • Should we make this configurable? (leaning towards no, feels too niche)

Yes, please. Being niche is not a good reason for being hardcoded. Some users need the feature (the amount (ie. because it's niche) doesn't matter), some press it by accident, some have completely different input devices.

  • Should we choose something else which is less likely to be accidentally pressed? What?

As suggested before, I'd find it nice to have to press the esc key longer (as default key bind). Or maybe press it more often (ie. double press).
Nice, ux wise, because if you're stuck in a form, pressing esc often or holding it will likely be a thing that you try, as opposed to a key combination that you've never been told about.


This issue could also be made less severe, if shift esc would just open the pause menu, and not immediately quit.

@Xeno333
Copy link
Contributor

Xeno333 commented May 30, 2025

Why is "Quit to Main Menu" an important feature to begin with? If a person is making a game where it's a self-contained experience, then it makes no sense to contain this as a hard-coded feature. Operating systems and window managers can quit applications just fine.

I strongly disagree this feature has application on a lot of PvP servers, where a player needs to quickly leave to avoid being killed.

We should make it a custom key combo, that is disabled by default or set to something more obscure.

@appgurueu
Copy link
Contributor Author

I strongly disagree this feature has application on a lot of PvP servers, where a player needs to quickly leave to avoid being killed.

Genuine question, why does a WM shortcut not do that job for you already? Alt + F4 is pretty easy to press quickly as well.

By the way, if leaving prevents you from being killed, you're not playing the good kind of PvP server 😄

@siliconsniffer
Copy link
Contributor

siliconsniffer commented Jun 1, 2025

I think both the button in the pause menu and the key binding server have their purpose (e.g., the button on mobile), but I completely agree that Shift + Esc is nowhere ideal. My experience with this key combo is identical to the ones described above.

Most applications I found seem to use Ctrl + q to quit; hence, I propose adding this as a new key binding that will both quit to the main menu and quit Luanti when in the main menu.

Additionally, I like the idea proposed by Wuzzy2 to have Shift + Esc only work in formspecs that don't allow closing (by conventional means).

@Xeno333
Copy link
Contributor

Xeno333 commented Jun 1, 2025

Genuine question, why does a WM shortcut not do that job for you already? Alt + F4 is pretty easy to press quickly as well.

It closes everything though, I want to just return to main menu

By the way, if leaving prevents you from being killed, you're not playing the good kind of PvP server 😄

True, but I was refering to escaping before attacked.

@appgurueu

This comment has been minimized.

@v-rob
Copy link
Contributor

v-rob commented Jun 1, 2025

What exactly is the point of this keybinding when desktop has alt+f4 and apps can swipe up?

I think this is terrible UX. If I get softlocked in a poorly-made GUI, I don't want to have to close Luanti entirely to escape it.

If we want to have some parallel with Alt + F4, we can use the Ctrl + F4 keybinding to exit to menu. It's less convenient than something involving Esc, especially since Alt + F4 is already a fairly unknown keybinding for some classes of users. I think Ctrl + Q as mentioned above is perhaps better. I would favor Alt + Esc assuming no desktop environments use that for anything. (Edit: Apparently Windows uses this)

(Side note, but from a developer point of view, I've already fallen in love with the exit to menu keybinding since I can exit and reenter the game from anywhere very quickly in order to test changes.)

@appgurueu
Copy link
Contributor Author

👍 for Ctrl + Q.

developer point of view

I don't really care about this; I just use --go when testing stuff. 🤷

@Desour
Copy link
Member

Desour commented Jun 2, 2025

Hardcoding to ctrl q is a bad idea. There will be users that sneak with ctrl and drop with q. They will no longer be able to drop single items with sneak drop.


What exactly is the point of this keybinding when desktop has alt+f4 and apps can swipe up?

I think this is terrible UX. If I get softlocked in a poorly-made GUI, I don't want to have to close Luanti entirely to escape it.

👍
But being softlocked in the first place is also terrible ux (from the mod). And luanti giving no way to overcome this softlock would also be bad ux. Having to use a key combo only is also bad ux.

@siliconsniffer
Copy link
Contributor

siliconsniffer commented Jun 2, 2025

Since my proposal has been interpreted a bit differently than I expected, I am trying to clarify it further. I propose that:

  • The Shift + Esc keybinding for quitting directly to the main menu stays hard coded but only functional in formspecs that don't allow quitting with Esc. Originally brought up here:

Maybe restrict this keybind to work only in those formspecs, but not in others. ~ Wuzzy2, #16201 (comment)

  • Ctrl + q will be added as a new keybinding (not hard coded), ideally with something like Allow keybindings with modifiers #14874. Alternatively it might be possible to split it into two separate keybindings. If a user would set sneaking to Ctrl it would result in a warning.

This way it's both configurable and harder to accidentally quit from a running game.

@v-rob
Copy link
Contributor

v-rob commented Jun 2, 2025

  • Ctrl + q will be added as a new keybinding (not hard coded), ideally with something like Allow keybindings with modifiers #14874. Alternatively it might be possible to split it into two separate keybindings. If a user would set sneaking to Ctrl it would result in a warning.

In the long term, having special keybindings be configurable is a good idea, but it's not what we have right now. In particular, Ctrl + Q would be both an in-game keybinding and an in-GUI keybinding. We only have provisions for binding the former, and the implication of binding a key that applied to both would need more consideration.

In any case, this issue needs to be patched soon since Shift + Esc is actively causing problems for people, and I don't think restricting it only to uncloseable GUIs is a good or consistent solution.

A third road is to bind Ctrl + Q to work only inside GUIs. Since GUIs already use plenty of Ctrl keybindings, this is basically guaranteed to cause no problems. Personally, I liked how Shift + Esc worked both in-game and in GUIs, but GUIs is where the keybinding is actually important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Issues meant for discussion of one or more proposals UI/UX
Projects
None yet
Development

No branches or pull requests

10 participants