Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

HTML keyboard controls not working sometimes

A topic by GrizzliusMaximus created Jun 25, 2021 Views: 750 Replies: 4
Viewing posts 1 to 5
Submitted

I noticed there is a recurring bug for many HTML games (including mine). Sometimes the keyboard keys do not work.  I believe what triggers this is when the player clicks away from the game to maybe check out the instructions or something.  Clicking on the game does not help.

One quick solution I found is to refresh the page, though it would be annoying  if this happens halfway through the game. 

Another solution that the developers could do is increase the viewport dimensions on itch (not in GMS) so there is this excess border the player can click on to get back in the game (I don't know why this works).

I checked out my other HTML games I made in GMS 2 and this bug didn't occur so I'm guessing it's a GMS 2.3 bug maybe. 

Submitted

I noticed this too. I've been refreshing the page to get past it too. I think HTML games are stuck with this issue because they're embedded on a webpage, and the space and shift/space keys scroll the page, and once this happens you can't just click the game to change focus back to the game. It's annoying, and I think a Windows EXE is the way to go for a Jam entry. Just my opinion.

Submitted

yeah, I've noticed this too. I've just got an EXE as well as HTML5 just in case

Submitted

It seems like they describe a possible solution here, until they have already corrected it in the engine: https://www.reddit.com/r/gamemaker/comments/kfs5cs/keyboard_inputs_no_longer_working_in_html5_game/

Submitted

I noticed spacebar would sometimes scroll the page and that's when I would lose control and had to refresh. Maybe it lost control right before I clicked spacebar though.