← Back to context

Comment by zamadatix

3 years ago

It might be cleaner to use event.code instead of event.key that way non-QWERTY users don't have to play finger twister. Unfortunately, Safari+Firefox don't leave a way to then determine the correct letter to display until after the user has already pressed the key which makes the initial "press this" a bit more difficult to write as you have to put a picture in the message clarifying you mean the WASD area not literal letters. Chrom* has an API for resolving the character outright though.