Skip to main content

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

Is backspace the only way to escape fullscreen?

A topic by Radnyx created Jul 11, 2018 Views: 715 Replies: 2
Viewing posts 1 to 3

I've got a webgame that requires the backspace key as it supports typing with the keyboard. The game is run in click-to-launch-in-fullscreen mode, but it seems that backspace is overridden (by itch?) to exit fullscreen mode. I'd much rather ESC do the escaping. Can I fix this?

Admin (1 edit)

It sounds like maybe your browser uses backspace to go back in history? itch.io doesn't make backspace do anything. If you need to use backspace in you project as an input (when not an an HTML input field), then they may have to call `preventDefault` on the javascript event

(+1)

You're right that it isn't itch.io.

Further inspection reveals this is a Firefox only issue where backspace is, for some ungodly reason, set to automatically go back a page.

Calling 'preventDefault' solves the problem and allowing ESC to go back a page works perfectly. Thank you.

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.