I checked on Windows, with a French engraved keyboard. The keycode varies with the layout. The upper left corner key generates
&h0C key q in US keyboard and &h00 key a in French keyboard layout.
Now I just checked on Mac with this :
Function KeyDown(Key As String) As Boolean
for i as integer = 0 to 500
If Keyboard.AsyncKeyDown(i) then
system.debuglog "Keycode : "+hex(i)+ " Keydown Key : "+key
return true
end if
next
End Function
You know what ? The upper left corner key keeps the code &h0C no matter the driver, whether it generates key q or a. So what I wrote before was based on my Mac experience, where key codes are immutable, no matter the keyboard driver.
I think the Mac way where key codes actually represent a fixed position for the key is more logical. It can also be useful to detect the type of keyboard, by comparing the key code and the generated character.