- don't pass undefined keycodes to the guest OS during KeyDown and KeyUp events (as it is already done for modifier key events) - fix a crash that occurs when pressing a dead key in the monitor (I already reported this on December 8th, please drop that old patch) - make HOME, END, and DELETE key work in the monitor - some code cleanup
A bit more in detail: In the keymap, undefined keys are represented with the value 0, but they are forwarded to the guest OS without checking. Currently, when running Linux as guest OS, the kernel log is flooded with messages like atkbd.c: Unknown key pressed (translated set 2, code 0x0 on isa0060/serio0). atkbd.c: Use 'setkeycodes 00 <keycode>' to make it known. atkbd.c: Unknown key released (translated set 2, code 0x0 on isa0060/serio0). atkbd.c: Use 'setkeycodes 00 <keycode>' to make it known. when such an undefined key is pressed. Cleanups: - use bytes instead of dwords for keymap[] to save some space in the binary - properly warn about _all_ undefined keycodes (not only those that are beyond the bounds of keymap[]) - we don't need an array of 256 integers to remember the state of those few modifier keys: as they are all in the range 0x36-0x3E of ADB keycodes, we can use the lower 4 bits as an index into a bit field - "num lock" is handled by NSKeyDown and NSKeyUp anyway, and doesn't go through NSFlagsChanged, so we don't need to probe for it there - in the function header of 'CustomApplicationMain', the types of argc and argv are not declared; this gives a warning with GCC4; we can safely remove these parameters since they are not used in the function (and are globally available in gArgc and gArgv anyway) I heavily tested this patch with Linux guest and 'showkey -s' and it works well. Fabrice, please apply soon! There are some more fixes to do (regarding to keymap), which requires the feedback of international users. Then, the attached patch will also make testing easier. Best regards Jo.
cocoa_keyboard.diff.gz
Description: GNU Zip compressed data
_______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel