|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] Bug in SDL key event processing |
Date: | Wed, 09 Jul 2008 18:52:32 -0500 |
User-agent: | Thunderbird 2.0.0.14 (X11/20080501) |
Samuel Thibault wrote:
Tomas Carnecky, le Thu 10 Jul 2008 01:27:49 +0200, a écrit :Why is there OS (X11/Windows) specific code in the SDL frontend? And why does qemu need keymaps anyway?The keymaps are for the VNC case, where you get a keyboard symbol, not a keycode, so you need to know how to translate back into a scancode.
Actually the keymap is for the case where hardware keycodes are not available. The guest needs hardware keycodes and you typically only get symbolic keycodes. The conversion from symbolic keycodes to hardware keycodes is a 1->many translation so a user needs to explicitly set what the translation is. You could possibly autoguess it by trying to get locale information I guess.
SDL in Linux happens to provide hardware keycode information so we don't need to use a keymap. This is not true on Windows SDL though IIRC. Likewise, under normal circumstances, hardware keycodes are not available through VNC.
I would expect qemu to translate my keypresses to corresponding bios scancodes and do no further processing.Yep.If you do that, you won't need the keymaps code, just a table to translate from SDL events to bios scancodes.
The problem is this is a 1->many translation. It all depends on what hardware keyboard you are emulation. That is really what you are choosing when you provide a -k option.
Regards, Anthony Liguori
In the SDL case that should work indeed. Samuel
[Prev in Thread] | Current Thread | [Next in Thread] |