Hello Anthony,
On Thu, Mar 08, 2012 at 03:30:18PM -0600, Anthony Liguori wrote: > On 03/07/2012 04:53 AM, Fabian Holler wrote: > >Hello, > > > >I'm not sure if I found a bug in QEMU's VNC keyboard layout mapping or > >if it's a general problem in the implemented VNC server: > > > >Scenario: > >QEMU started with: "-k de" > >Keyboard layout in VM: de > >Keyboard layout from Client OS: us > > > >What i expect: > >I type the '/' character on the Client OS (key left from the > >right-shift-key) on US layout. > >Keysymbol '/' is send over VNC to the QEMU. > >QEMU lookup in the de keyboard mapping table for the character '/' and > >should find the scancodes for the keys shift+'7'. > >The Scancodes for shift and '7' > > This does not exist. There is no such thing as "Scancodes for shift and '7'". > > Instead, what's sent to the Client OS is literally, "the key at the > fourth column, second row". Yes, I know. What i actually meant was: with the knowledge of the used keyboard layout and the key symbol QEMU could figure out that it has to send scan codes for the keys that are labeled SHIFT & 7 on a keyboard with DE layout. Afaik QEMU does this already for the 7 labeled key. But it doesn't remove/adds additional needed metakey presses like eg Shift. Or I'm wrong? The idea was to add these interpretation to also add/remove additional metakey scancodes for the VM if needed. > There's really nothing that can be done about this. The way gtk-vnc > fixes this is by obtaining the actual scancode from the user's > keyboard. But you can't get this in Java in an applet AFAIK. The same should work in a Java Applet but you also have to figure out the used keyboard layout and handle metakeys. regards Fabian