On Mar 15, 2016, at 1:43 PM, Peter Maydell wrote: > On 15 March 2016 at 17:17, Programmingkid <[email protected]> wrote: >> This commit implements the adb-keys.h file. It holds information on adb >> keycode >> values. >> >> Signed-off-by: John Arbuckle <[email protected]> >> --- >> * v5 changes >> +/* >> + * adb-keys.h >> + * >> + * Provides an enum of all the Macintosh keycodes. >> + * Note: keys like Power, volume related, and eject are handled at a lower >> + * level and are not available to QEMU. That doesn't mean we can't >> + * substitute one key for another. The function keys like F1 make a >> good >> + * substitute for these keys. This can be done in the GTK, SDL, or >> Cocoa >> + * code. >> + * Additional information: >> http://www.archive.org/stream/apple-guide-macintosh >> + * >> -family-hardware/Apple_Guide_to_the_Macintosh_Family >> + * _Hardware_2e#page/n345/mode/2up - page 308 > > Better to have the whole URL on one line so you can just cut-n-paste > it into a web browser.
It goes against the guidelines, but ok. > >> + ADB_KEY_LEFT_CONTROL = 54, >> + ADB_KEY_RIGHT_CONTROL = 125, >> + ADB_KEY_LEFT_OPTION = 58, >> + ADB_KEY_RIGHT_OPTION = 124, >> + ADB_KEY_LEFT_COMMAND = 55, >> + ADB_KEY_RIGHT_COMMAND = 126, > > Where does this one come from? The Apple doc shows the Extended Keyboard > as generating the same keycode for left and right command (0x37). I think it came from the old pc_to_adb_keycode array. The xev command in a linux guess does correctly report that Right Super key is being pushed when ADB_KEY_RIGHT_COMMAND is set to 126. On a Mac OS guess keyboard viewer does indicate at least one of the command keys is being pushed. So this value does work.
