qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Edu <edusaper@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: AltGr keystrokes
Date: Thu, 3 Aug 2006 00:52:19 +0200	[thread overview]
Message-ID: <83a4d4ca0608021552l4ebad5cbxeab2dfa6d24bbdad@mail.gmail.com> (raw)
In-Reply-To: <pan.2006.08.02.01.46.11.895752@codemonkey.ws>

2006/8/2, Anthony Liguori <anthony@codemonkey.ws>:
>
> 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	other threads:[~2006-08-02 22:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-02  0:22 [Qemu-devel] Re: AltGr keystrokes Edu
2006-08-02  0:38 ` VNC (or RFB), was " Johannes Schindelin
2006-08-02  1:46 ` Anthony Liguori
2006-08-02 22:52   ` Edu [this message]
2006-08-08 22:51   ` [Qemu-devel][PATCH] " Edu
  -- strict thread matches above, loose matches on Subject: below --
2006-07-31  8:10 [Qemu-devel] " Gaetano Sferra
2006-07-31 10:13 ` Eric Hameleers
2006-07-31 15:10   ` [Qemu-devel] " Anthony Liguori
2006-08-01  2:58   ` Anthony Liguori
2006-08-01  6:14     ` Gaetano Sferra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83a4d4ca0608021552l4ebad5cbxeab2dfa6d24bbdad@mail.gmail.com \
    --to=edusaper@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).