itch.io Spring Selects Series A
On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

No Crypto For Old Men 7DRL

Hack servers and steal data in this HTML5 roguelike game. · By Lone Spelunker

Space and Backspace keys being sent to the browser.

A topic by KhaoTom created Mar 12, 2016 Views: 801 Replies: 12
Viewing posts 1 to 6

I've been clicking in the window area to try to give it focus, but I'm still finding that the space and backspace keys get caught by the browser. Space causes the window to scroll, and backspace navigates to the previous web page, completely killing any game progress. Any ideas how to get around this?

Game is cool btw!

Developer (1 edit)

Glad you like the game.

I'd heard about issues with the backspace key before, but I hadn't heard about the space bar. I think what I'll do is experiment with stopping propagation of those keys to the window. In an earlier build, I was just doing a blanket block, and that was causing other problems (not the least of which being that it blocks popping up a debug window!), but I think if I do a more nuanced selection of keys, I can get around those problems.

I'll try to get a build up today that addresses this. Thanks for playing and taking the time to give feedback!

Edit - Okay, I just uploaded a build that should block space and backspace events. Try it out and let me know if it fixes that issue.

Space is no longer causing the scroll down, however backspace is still causing the browser to navigate back. It is much more playable now with the space key blocked :) I wonder why we see such different behavior. Oh the joys of web game development I suppose!

Developer

Want to help me troubleshoot this? Can you go to this URL:

Backspace Tester

...hit the backspace key, and tell me what keyCodes it reports for each event type?

KeyDown = 8

KeyPress = - (blank?)

KeyUp = 8

Developer

Okay, I've uploaded another build that seems to fix it on at least some of the browsers people were having trouble with. Care to try it again? Thanks!

Awesome! It seems fixed for me now, thanks!

Developer

Great! Glad to hear it's working for you now.

Developer

Hmm. That's exactly how my browser sees it, too, so that's not the issue, I guess. I'm not sure what's causing it, then, so I guess I'm going to be doing a little internet research to try to figure this out! Thanks for taking the time to do that and get back to me.

Deleted 4 years ago
Developer

Thanks for reporting these issues. Clearly, there are some keyboard handling issues that are more esoteric than I thought.

Thanks to a reddit user, I've identified a bug, fixed it, and uploaded a new build, which should address the issue you described. Or, at least, the bug I fixed could conceivably cause what you described. If it's still doing it, let me know.

Glad you like the game (and thanks for taking the time to say so!).

Deleted 4 years ago
Deleted 4 years ago
Developer

Okay, I've posted a new build that I think will address the space bar issue in those locations. The different way browsers handle keys is driving me up a wall!

Thanks for taking the time to report these issues.

Deleted 4 years ago
Developer

All right. Okay. I know I have said this before.

But I have uploaded a new build that should address these keyboard issues in FireFox. Sorry for the trouble.

(And your comments about GIFFs and the Kanye tweet made my day! It's a good thing I wasn't drinking milk when I read that.)

Deleted 4 years ago
Developer

Nice. Thanks for helping me troubleshoot this.