Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Disabling the ESC key in the webplayer

Discussion in 'Scripting' started by jedy, Jul 8, 2011.

  1. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    The question :
    Disabling the escape key in the webplayer - how? Is it possible by any means?

    My research:
    I've read about the topic and the only idea I've got is to use windows hooks which surprisingly would work only with windows, apart from the fact that it is a hell of a drag to code and that almost certainly antivirus programs would block it and etc.
    The last thing I'm considering is a small application that has only one functionality - blocking the ESC key, which hardcore gamers could download and use.
     
  2. AngryAnt

    AngryAnt

    Keyboard Operator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    That is simply not going to happen. A website launching something in fullscreen without a standard way of breaking out of it? No.
     
  3. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    Yes. That could be a deal breaker for ad ware or harassing people but in therms of browser gaming it could be a blessing. And another thing is that the ESC keys functionality may just be moved to some other button.
     
  4. AngryAnt

    AngryAnt

    Keyboard Operator

    Joined:
    Oct 25, 2005
    Posts:
    3,045
    Indeed, but you understand why we can do absolutely no compromising here. It's a user experience deal breaker.
     
  5. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    A compromise would be giving the user an option to remap the key himself from the unity webplayer options. This may be considered of big use by many people because in most games the escape key is used to bring the options menu up. At the same time it won't be an option for harassing the users because only the user himself would be able to remap the key.
     
  6. spinaljack

    spinaljack

    Joined:
    Mar 18, 2010
    Posts:
    992
    How could you enforce that? As soon as you've exposed that function to developers you've lost control of it. Clearly not going to happen.
     
  7. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    Not exposing the function to developers but to users. Users would have the ability to remap their key, developers won't.
     
  8. KyleStaves

    KyleStaves

    Joined:
    Nov 4, 2009
    Posts:
    821
    Even if that was implemented, doesn't it seem a bit contrived? To me it sounds far easier to simply communicate to the user:

    "Press *randombutton* to bring up the option menu."

    Verse

    "Press *randombutton* to bring up the option menu, unless you go into the Unity Webplayer options and then remap the hard-escape-fullscreen button to something else, then *escape* will bring up the option menu."

    You would still have to take into consideration the users who don't remap the hard-escape, so you are really only adding a convoluted option. Any users who would be willing to jump through hoops to have escape bring up the options menu would be equally willing to just use a different button in my opinion.

    As an end user, it would absolutely suck to play a Unity game in July - remap my hard-escape-fullscreen key at their request, not play another Unity game for 6 months, go fullscreen, forgot what my hard-escape-fullscreen key was bound to. I would almost certainly blame the new game/Unity itself for not letting me get out of fullscreen, not that game I played 6-months ago and forgot about.

    Pandoras box is not as good as Pandora radio.
     
  9. jedy

    jedy

    Joined:
    Aug 1, 2010
    Posts:
    579
    It have never been a big deal but It may bring convenience to some people I think.