# ESC key functionality \[Webplayer\]

**URL:** https://discussions.unity.com/t/esc-key-functionality-webplayer/441238
**Category:** Scripting
**Tags:** Scripting
**Created:** [April 2, 2011, 1:10pm UTC](https://discussions.unity.com/t/esc-key-functionality-webplayer/441238 "2011-04-02T13:10:11Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![jedy](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jedy/32/198687_2.png) [@jedy](https://discussions.unity.com/u/jedy)
#### Post date: [April 2, 2011, 1:10pm UTC](https://discussions.unity.com/t/esc-key-functionality-webplayer/441238/1 "2011-04-02T13:10:11Z")

</div>

Is it possible to remove the default function of the ESC key in the webplayer ( Turning off Fullscreen )…  
If there isn’t any built in functions in Unity any ideas are welcome!

Thanks.

---

<div class="post-metadata">

### Author: ![j\_y\_k](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@j\_y\_k](https://discussions.unity.com/u/j_y_k)
#### Post date: [April 2, 2011, 1:13pm UTC](https://discussions.unity.com/t/esc-key-functionality-webplayer/441238/2 "2011-04-02T13:13:21Z")

</div>

I’m not completely sure of this, but I think the answer to your question is no, the behavior can’t be disabled or changed (the reasoning being that it’s a security feature that shouldn’t be overridden).

---

<div class="post-metadata">

### Author: ![jedy](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jedy/32/198687_2.png) [@jedy](https://discussions.unity.com/u/jedy)
#### Post date: [April 2, 2011, 1:25pm UTC](https://discussions.unity.com/t/esc-key-functionality-webplayer/441238/3 "2011-04-02T13:25:26Z")

</div>

I expected that. My idea for now is to use C# features to disable the ESC functionality at all. I’m exploring the topic at the moment.

Global System Hooks maybe will do the trick.  
[http://www.codeproject.com/KB/system/globalsystemhook.aspx](http://www.codeproject.com/KB/system/globalsystemhook.aspx)

---

<div class="post-metadata">

### Author: ![Quietus2](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/quietus2/32/444325_2.png) [@Quietus2](https://discussions.unity.com/u/Quietus2)
#### Post date: [April 2, 2011, 3:23pm UTC](https://discussions.unity.com/t/esc-key-functionality-webplayer/441238/4 "2011-04-02T15:23:37Z")

</div>

> [@jedy](#):
>
> Global System Hooks maybe will do the trick.  
> [http://www.codeproject.com/KB/system/globalsystemhook.aspx](http://www.codeproject.com/KB/system/globalsystemhook.aspx)

Have you tried it? I would think that wouldn’t be included in a webplayer build for security reasons. Those are the same set of API’s you use to create things such as a keylogger.

---

<div class="post-metadata">

### Author: ![jedy](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/jedy/32/198687_2.png) [@jedy](https://discussions.unity.com/u/jedy)
#### Post date: [April 3, 2011, 12:07pm UTC](https://discussions.unity.com/t/esc-key-functionality-webplayer/441238/5 "2011-04-03T12:07:37Z")

</div>

I’ve read the materials on the subject but I highly doubt that It will work in the web player.  
Basically I will have to cheat the unity web player, the browser, the windows and couple of other things JUST to disable a key. That may even be considered a threat by some anti-virus software. Unacceptable for a game.
