I have a game that can be played in your browser. It's a retro game (multiplayer snake) and the menus and your snake can only be controlled using your keyboard. Mouse input is ignored.
I was using the Esc key to cancel all sorts of actions, like cancelling a confirm popup, going back a step in a menu, exiting a game, cancelling focus on an input field.
The problem is that my game supports html5 fullscreen mode, and browsers will exit fullscreen mode when Esc is pressed. I cannot override that because of browser security.
At first, I thought I would just use both Backspace and Delete to trigger a cancel action, and promote these keys in the initial instructions. Problem is that these keys already have a function when an input field is focused, so I need something else to cancel that.
Also, I'm afraid users will use Esc anyway because they expect it to cancel things. So maybe I should support it when not in fullscreen, and add an alert popup when entering fullscreen that Esc will now exit fullscreen mode and you must use some other key for cancelling. But changing the keyboard layout halfway is not ideal.
I could also skip fullscreen mode entirely because Esc is essential for a good UX of the game and there is no acceptable workaround.
How would you solve this?