r/Websites • u/Renell06 • 4h ago
Question How do you create shortcut keys for a website game that works for any browser?
5
Upvotes
I'm making a browser game and want to add custom shortcut keys (without any installations on the user's side) so players can perform actions without using the mouse.
I've been looking at javascript keyboard events but apparently its not as straightforward as I thought. Can this even be accomplished to work for any browser or computer? How do you handle conflict with existing browser shortcuts and mac vs windows?