4 ms·
Using `code` here is pure ineptitude. It represents the physical position of a key, and is only useful for things like games using WASD movement; the same physi
by kps 3y ago
Using `code` here is pure ineptitude. It represents the physical position of a key, and is only useful for things like games using WASD movement; the same physical key routinely maps to different inputs under different languages and layouts. And `code` might not be set at all for on-screen (e.g. phone) keyboards. And IMEs don't necessarily send key events at all.