Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Is there a way to disable the Escape key in HTML5 games?

A topic by kymakesgames created May 01, 2020 Views: 1,078 Replies: 3
Viewing posts 1 to 5

I've got an HTML5 Unity game that I will present full-screen in browser. I will be implementing a pause menu to include things like game options, graphics options, etc. and I'd like for that menu to be triggered with the Escape key. Players would also be able to disable full-screen mode while in that menu.

Is there a way to have the Esc key not switch back to windowed mode when in full-screen?

(+3)

I don't think browsers let this. It is a security risk.

(+4)

I just had this problem with my game. Xentios is right, browsers OWN that key, sorry. I switched my pause menu functionality to Backspace instead.

(+1)

Thank you both for the info!

Moderator moved this topic to General Development