Reputation: 5252
I'm currently developing a very smal and specific HID Keyboard with a atmega microcontroller. The biggest problem i have is that a keycode is very specific for the locale that is currently set on the host pc.
All normal chars like a-z are working very well but some special chars are producing bad results when the key is pressed.
For example the +
Key, which is 0xE1
& 0x2E
(LeftShift & KeyboardEqualSign) does only work on a US Keyboard. But i use a German Layout, so i get a ß
instead.
How can i now get the right keycodes for the German Layout? I cant find any document that describes such keys... I think the HID Keycodes are really bad designed to support multiple keyboard layouts :(
Do i need to lookup my keys on a german layout what they would be in us? So for the +
Sign its probably the ]
key? But why the heck its a so stupid design? Is there any wrapper for that?
Upvotes: 2
Views: 2626
Reputation: 101
had the same problem. I took a picture of an en_us keyboard and compared it to my german keyboard and then I transfered that on the keycodes... Its not yet finished because its a suprisingly lot of work and I do not need other characters right now. Most important characters should be there. Its sorted after Iso8859, I let the iso codes stay maybe that helps someone.
Here you go:
iso8859 hex code, modifier, usb hid keycode, character
Hope that helps you or the next stumbling upon that problem :)
Best regards
Upvotes: 1