qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: AltGr keystrokes


From: Edu
Subject: Re: [Qemu-devel] Re: AltGr keystrokes
Date: Thu, 3 Aug 2006 00:52:19 +0200

2006/8/2, Anthony Liguori <address@hidden>:

You're right, I'll submit a patch to fix that.  Let me know if it helps.


Well, it indeed helps to some extent, but it's not enough.

Tracking down the problem I've found out that modifiers after
scancodes in keymap files are completely ignored in function
parse_keyboard_layout (keymaps.c).

In "es" keymap we find:

quotedbl 0x03 shift
at 0x03 altgr

Which means
" ==> Shift + 2
@ ==> AltGr + 2

Logging TightVNC client messages:

[ PRESS SHIFT ]
 VNC msg: DOWN 0xFFE1 --> OS receives keycode: 0x2A

[ PRESS 2 ]
 VNC msg: DOWN 0x22   --> OS receives keycode: 0x03

[ RELEASE 2 ]
 VNC msg: UP   0x22   --> OS receives keycode: 0x03

[ RELEASE SHIFT ]
 VNC msg: UP   0xFFE1 --> OS receives keycode: 0x2A

This works correctly and double quote is printed, but...

[ PRESS ALTGR ]
 VNC msg: DOWN 0xFFE3 --> OS receives keycode: 0x1D
 VNC msg: DOWN 0xFFEA --> OS receives keycode: 0x38

[ PRESS 2 ]
 VNC msg: UP   0xFFE3 --> OS receives keycode: 0x1D
 VNC msg: UP   0xFFEA --> OS receives keycode: 0x38
 VNC msg: DOWN 0x40   --> OS receives keycode: 0x03
 VNC msg: DOWN 0xFFEA --> OS receives keycode: 0x38
 VNC msg: UP   0xFFE3 --> OS receives keycode: 0x1D
 VNC msg: UP   0xFFE3 --> OS receives keycode: 0x1D
 VNC msg: UP   0xFFEA --> OS receives keycode: 0x38
 VNC msg: UP   0x40   --> OS receives keycode: 0x03
 VNC msg: DOWN 0xFFEA --> OS receives keycode: 0x38
 VNC msg: UP   0xFFE3 --> OS receives keycode: 0x1D
 VNC msg: UP   0xFFE3 --> OS receives keycode: 0x1D
 VNC msg: UP   0xFFEA --> OS receives keycode: 0x38

... doesn't work at all.

As you can see, VNC client sends messages to release AltGr modifier
before sending 0x40 symbol ( @ ). It relies on the server to know how
to get it. As the OS receives a bare 0x03 keycode, the resulting
character is 2. Qemu should send to the OS the AltGr keydown event
before the 0x03 scancode, as the keymap says. Double quote case
shouldn't be affected by the extra Shift keydown event.

Regards,
Eduardo Felipe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]