4 ms·
The problem if you use "a" and "d" is that it will only work with qwerty keyboards. In azerty for instance the equivalent would be "q" and "d". So for a small
by laurent123456 8y ago
The problem if you use "a" and "d" is that it will only work with qwerty keyboards. In azerty for instance the equivalent would be "q" and "d".
So for a small demo it's probably better to just use arrows as this will work everywhere, and there won't be a need to support all keyboard layouts out there.
- why_only_15 8y agoBe real - what percent of people are using azerty, even on HN?
- pierrec 8y agoShow HN: Space Invaders, but it doesn't work for French people
- Insanity 8y agoAt least the majority of France / Belgium. I switched to qwerty about 2 years ago, but almost everyone I know uses azerty here (as software engineers). Personally, I don't expect it to be supported though. But it should at least have a fallback like the arrow keys.
- pluma 8y agoAh, yes, the "fuck internationalisation, we're all living in America anyway" argument. EDIT: Data point of 1: I'm German and use a QWERTZ layout because it's a hassle to type umlauts on QWERTY even with a compose key. If I were French that'd mean I'd be using AZERTY.
- pierrec 8y agoThat's not the argument. They just seem to believe that it's a nerdy alternative layout like Dvorak ("...even on HN"). Not everyone is familiar with international layouts.
- pluma 8y agoI would think the kind of people interested in technical posts on HN should better be aware of at least the most basic i18n issues.
- mrspeaker 8y agoWhen I do game-jam games I always make both "a" and "q" left, and "z" and "w" up... and I always get a comment or thanks from the french players ;)
- tobyhinloopen 8y agoThats what charCode and keyCode are for. keyCode refers to the physical keys (named A and D on any keyboard, even if the printed letters are different), charCode refers to the character the key represents (which differs per keyboard layout)