Let developers temporarily override the Escape key using ContextActionService

It’s very common practice for non-Roblox games to use the Escape key as a “back” button when navigating UI; closing the current window, going back in a menu, cancelling your current action, etc. It’s an extremely convenient keybind to have, as it’s easily within reach while your hand is resting on the WASD keys, and it helps with accessibility when it’s difficult/slow to manually find and click a “close” button on the screen each time.

Unfortunately, since the Escape key is exclusively reserved for opening the Roblox menu, developers cannot utilize this extremely common and convenient keybind for their own games. Instead, developers need to use a key like Backspace for this purpose, which is very inconvenient to reach over and press when your left hand is on WASD.


Obviously, it’s understandable that Roblox has the restriction in place to stop developers from blocking access to the Roblox menu, but I feel like a fair compromise could be made:

If the developer currently has a CAS binding which sinks the Escape input, holding the Escape key for half a second will still forcibly open the Roblox menu, ignoring any developer overrides. While holding the Escape key in this case, the top-left Roblox menu button would show a “filling up” progress bar animation, to make it very clear to the player that they can still open the Roblox menu by holding Escape. This would let developers access the keybind while still preventing them from locking players out of the Roblox menu.

If the developer has nothing bound to Escape, or the associated CAS binding function does not sink the input, the Roblox menu would open instantly like normal.

Of course the main concern is that irresponsible/malicious developers would try to lock players out of accessing the Roblox menu, but I think this proposal is a fair compromise which gives legitimate developers the flexibility to add a very useful keybind to their games, without letting malicious developers ruin it for everyone. Even if players don’t immediately realize that holding Escape will still open the Roblox menu, most people trying to use the Escape hotkey would also know that Alt+F4 will also get them out of the game.

There are already a lot of other features which can be used irresponsibly (such as bringing up purchase prompts with no warning), but those developers will naturally receive player complaints and suffer reduced popularity if they’re trying to trick players/lock them into the game. (It’s also already possible where younger/less experienced players get stuck when they’re in a first-person game where they can’t move the mouse, and they don’t know the Escape key is even an option.) Legitimate developers will be naturally motivated to use the feature correctly to provide a better UX to players.


If Roblox is able to address this issue, it would make it easier for myself and other developers to provide a high quality, accessible UI navigation experience to players - while many players do exclusively use the mouse for this, it’s important to remember that some players prefer being able to navigate using the keyboard, whether for ease of use or for accessibility purposes, and we should be able to make this experience feel as natural as possible.

48 Likes

I dont think I’ve ever pressed Escape to leave a game, I just press the X button as is natural to me.

The only thing I use the menu for is resetting my character.

5 Likes

This is a feature I really want. TAB is often used to show player leaderboards- this means I can’t use it for what I’d use an escape menu for. Placing a leaderboard and a settings tab in the same UI is just… not intuitive. Escape menus are important.

I think if this is added, it’d seriously improve Roblox’s viability as an actual game engine. One of the worst parts of Roblox (for me, besides no reliability types) is being locked away from the escape key. This would be amazing for UX.

5 Likes

Support, the closest thing we have to the escape key is the backtick (`) which varies on some keyboards. A game I’m working on has a pause menu that I would ideally like to be activated with escape, but I’m forced to use UserInputService because of these limitations. Speaking of UIS, why is it able to detect escape inputs but not ContextActionService?
On the topic of players not knowing that holding escape opens the menu, maybe a notice similar to the “You can’t use emotes right now” notification if the player spams escape
RobloxScreenShot20221016_113254861

1 Like

ContextActionService ignores all inputs registered by the CoreScripts.

Why would this be necessary and what does this mean? I don’t really understand what you said here.

Informing the player that the escape key is currently being utilized for a particular action in the game when the player tries to press the key multiple times under the impression that it’s still a single press of Esc to open the menu.

3 Likes

In addition to the Escape key, I wish to be able to use the “Menu button” on Xbox remotes. Currently, we as developers cannot use it effectively. This would have to be a whole other feature request, however, I cannot post it on my own because rank issues.

This is actually a solution I really like, the UI would have to be noticeable enough to players though. Bring up some UI in the top left when the player initially presses the ESC key with something like “Hold ESC to open Roblox Menu” or something.


My post here has come from knowledge gained from these two posts that I feel are relevant and could be of some use:
https://devforum.roblox.com/t/let-developers-use-esc-keybind-for-their-own-menus/2030558
https://devforum.roblox.com/t/roblox-locked-features-problems-trust-in-developers-blocking-features-based-on-trust/2030900

2 Likes

A completely necessary feature for roblox devs in the year 2022. The escape key is essential for menu navigation. I’m stuck having to find a strange alternative to an otherwise universal standard. Can’t expect proper game menus if devs don’t have proper control. There’s a balance that could be reached with safety as OP suggested.

2 Likes

Bump I need this for my game I would really appreciate it if ROBLOX added this