Change Keyboard layout library

Hi, im trying to change layout of keyboard library in italian. Im trying to understand how the library works but i cant understand the part contains the ascii table, for example, why the letter 'a' equals to 0x04 and not 0x65?
Please help me to understand the functioning of library.

Please post a link to the library.

Because 0x04 is the USB key code for the key that has an 'a' on it on the US-English keyboard. See "Keyboard/Keypad Page (0x07)" starting on page 53 in the USB HID spec:

Ok i have done italian layout.
Thank you very much, I couldn't even find the pdf that contained the protocol information.
I have last question...Why the SHIFT is defined 0x80 when in HID pdf is defined as E1?

The typical PC keyboard has 108 or 110 keys. Most of those keys map to two different ASCII characters: a/A, b/B, 1/!, 2/@... The code that is sending keystrokes needs to know if the keycode should be sent with SHIFT or without. The top bit of the table is used for a SHIFT flag.

Note: Many non-US keyboards have 3 or 4 characters on some keycaps. These use the ALT-GRAPH in combination with SHIFT to select which of the characters is being sent. Unfortunately, the Keyboard lookup table doesn't have room for a second flag so the ALT_GRAPH characters can't be put in the table.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.