Hacker News new | ask | show | jobs
by felixg3 530 days ago
Unfortunately very specific to QWERTY layouts:(
1 comments

That depends entirely on whether you opt to do the compare by code or key. E.g. in JS KeyboardEvent.code == "KeyW" may resolve true even though KeyboardEvent.key == "W" may resolve false because the user is on AZERTY or what have you.
Ergonomic keyboards on software like ZMK or QMK actually change both iirc, so that's a no go for external keyboard users.
I'm a QMK user with a custom no -standard layout myself. I think you're referring to mapping keys to a given keycode as part of the firmware config. That's not inherently a problem, do it properly and it still lines up with whatever OS layout you load. If you're purposefully changing the keycodes to avoid letting the OS know the layout is different... well, you got what you explicitly configured you wanted it to behave like? Leave a layer if you expressly don't want said behavior, it's not up to the app developer to assume you meant to do otherwise.