- Home /
disable esc to exit full screen?
I realize that the web player uses Esc as a safety mechanism for users to exit full screen. However, I want to use Esc for doing other things in my game, like canceling an action. Is it possible to disable to "Esc to exit full screen" functionality? I have a button on my interface, with code that toggles full screen, so I don't need the Esc to exit.
Answer by Bunny83 · Apr 20, 2011 at 01:47 AM
That's not a up to you. If you have the webplayer installed Unity content on a webpage will load automatically. It's much more important for the user to have a save way to get the focus back and exit the full screen. Otherwise you can trap the user in your application without a way to get out.
So the simple answer to the question is: NO.
Use another key for menu (since "escape" is even more suitable for "get me outa here" than "open the menu"). I know, most standalone games use escape for menus or navigation but the webplayer is something different. You have to live with it.
Absolutely. The keyboard has over 100 keys on average... If you have that many ways to do things, than maybe trash the game, but I doubt you do... So have a GUI button to cancel, and keep the escape key. Psychologists are hired to do this work, unless you have a degree in psych, then you can consider, buuuut, yeah. =)
Yep, it would be really bad if it was possible to disable this functionality. $$anonymous$$aybe you're being nice and providing an alternate way of getting out of fullscreen, but not everybody is necessarily going to do that, leaving you stuck in fullscreen with no way out. It's not feasible to allow that to happen by disabling expected behavior.
Also to add, I see your from $$anonymous$$I, well, being that you're from America, you should understand that Americans aren't... Smart? Intelligent? Have common sense? Etc. So, I think now you can see that it's not the greatest idea, haha.
Eric, I understand the reasoning behind it, but I think it would be better if the Unity player automatically confirmed with the user before going into fullscreen, rather than using up a commonly used key within games. After all, I can't imagine that the standalone builds exit full screen with Esc, though the same argument exists regarding getting stuck in full screen mode. The only difference is that the web player will automatically start (hence the confirmation). Oh well. I guess players will have to get used to it.
Answer by psychentist · Apr 20, 2011 at 03:09 AM
why not use tilde (~) instead. it's close enough to escape to be useful for things like that.
Well, that depends on your keyboard layout ;). On my keyboard(german) the tilde is the third case on my plus(+) key, that would not be a nice key for me :D. Below the escape key i have the circumflex (^). It's not that easy to find a key that stays the same on all keyboard layouts. Well, you can use Application.systemLanguage to do a switch case for each language :D
Your answer

Follow this Question
Related Questions
How do I make my webplayer fill the entire browser window? 8 Answers
Where is FullScreenMovieScalingMode used 1 Answer
How to check if fullscreen on or off? 1 Answer
FullScreen Mode Help 1 Answer