From: Markus Armbruster <armbru@redhat.com>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: Laurent Vivier <Laurent.Vivier@bull.net>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
Anthony Liguori <aliguori@cs.utexas.edu>,
sos22@srcf.ucam.org, Jeremy Katz <katzj@redhat.com>
Subject: Re: [PATCH] Paravirt framebuffer backend tools [2/5]
Date: Wed, 11 Oct 2006 15:49:47 +0200 [thread overview]
Message-ID: <87k637nero.fsf@pike.pond.sub.org> (raw)
In-Reply-To: <1160499227.5951.35.camel@sisko.scot.redhat.com> (Stephen C. Tweedie's message of "Tue, 10 Oct 2006 17:53:47 +0100")
"Stephen C. Tweedie" <sct@redhat.com> writes:
> Hi,
>
> On Sat, 2006-10-07 at 18:48 +0200, Markus Armbruster wrote:
>
>> The backend gets keys in an encoding that depends on the software used
>> to access the keyboard:
>>
>> * with SDL, struct SDL_keysym (consists of scancode, SDL keysym,
>> current modifiers and optionally Unicode translation),
>>
>> * with LibVNCServer: rfbKeySym (which is just an X11 keysym).
>>
>> The frontend needs to stuff Linux keycodes into the input layer.
>>
>> Our job is to translate from frontend keysyms to Linux keycodes, and
>> the question is to find out how and where.
>
> Bear in mind that it may simply not be possible. :-(
>
> An example is my UK keyboard connecting to a guest with a US keymap.
> For me, "#" is a key on its own (with "~" as the shift-modified key.)
> When I type "#", with no modifier pressed, there is simply no way to
> translate that to a single keycode on a US keymap and get the "#" ksym
> out --- on a US keyboard, "#" requires shift to be held down.
>
> The only way you'll get such a keypress through is by faking modifiers
> on the fly.
Arguably, `#' is not a raw key, its something bound to a key by
keymapping software. Let me call that a mapped key, for lack of a
better word.
Options I can see:
(1) Start with the host's mapped keys. Fake raw keys in the guest so
that guest keymapping maps them to the mapped keys we see in the
host.
Nice: host key map just works across all guests.
However, I fear this is a game we can't win: we can hardly assume
that every keymap can produce every conceivable mapped key, no
matter how much we fool around with modifiers. Perhaps we could
be good enough at the game to make things work well enough for
most users. I don't know. Smells like a swamp to me.
(2) Simply use the host's raw keys.
The guest needs to understand the host's raw keys, and map them if
they differ from its own idea of raw keys. At this time, the only
idea of raw keys in town is Linux keycodes, so no mapping is
necessary.
Nice: simple & stupid.
Unless I misunderstand Anthony, that's what rdesktop and qemu do.
(3) Define some abstract key encoding, map from host raw keys to that,
then to guest raw keys.
If we simply choose the current Linux keycodes as abstract
encoding, we get (3) for the price of (2) now, and pay the rest
only when Linux keycodes change incompatibly. Which I figure is
rather unlikely.
What do you want me to code?
next prev parent reply other threads:[~2006-10-11 13:49 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-02 19:58 [PATCH] Paravirt framebuffer backend tools [2/5] Jeremy Katz
2006-09-04 9:01 ` Steven Smith
2006-09-04 12:55 ` Laurent Vivier
2006-09-06 9:15 ` Steven Smith
2006-09-06 11:41 ` Laurent Vivier
2006-09-06 17:10 ` Steven Smith
2006-09-06 17:50 ` Gerd Hoffmann
2006-09-07 7:32 ` Laurent Vivier
2006-09-07 7:50 ` Steven Smith
2006-09-07 7:31 ` Laurent Vivier
2006-09-07 8:38 ` Steven Smith
2006-09-07 9:31 ` Laurent Vivier
2006-09-07 9:55 ` Steven Smith
2006-09-07 12:03 ` Laurent Vivier
2006-09-08 13:26 ` Anthony Liguori
2006-09-08 14:00 ` Laurent Vivier
2006-09-08 14:12 ` Steven Smith
2006-09-08 14:23 ` Anthony Liguori
2006-10-07 16:48 ` Markus Armbruster
2006-10-10 16:53 ` Stephen C. Tweedie
2006-10-10 17:46 ` Anthony Liguori
2006-10-10 17:46 ` Anthony Liguori
2006-10-11 13:49 ` Markus Armbruster [this message]
2006-10-11 15:18 ` Gerd Hoffmann
2006-10-11 15:21 ` Laurent Vivier
2006-10-10 18:48 ` Steven Smith
2006-09-10 10:40 ` Steven Smith
2006-09-10 13:05 ` Anthony Liguori
2006-09-05 16:11 ` Jeremy Katz
2006-09-05 16:57 ` Anthony Liguori
2006-09-06 9:14 ` Steven Smith
2006-09-06 9:13 ` Steven Smith
2006-09-30 8:51 ` Markus Armbruster
2006-10-02 9:01 ` Steven Smith
2006-10-04 14:04 ` Markus Armbruster
2006-10-04 14:20 ` Daniel P. Berrange
2006-10-04 14:57 ` Anthony Liguori
2006-10-05 18:41 ` Steven Smith
2006-10-05 18:33 ` Steven Smith
2006-10-06 14:10 ` Markus Armbruster
2006-10-07 9:42 ` Steven Smith
2006-09-12 18:55 ` Daniel P. Berrange
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=87k637nero.fsf@pike.pond.sub.org \
--to=armbru@redhat.com \
--cc=Laurent.Vivier@bull.net \
--cc=aliguori@cs.utexas.edu \
--cc=katzj@redhat.com \
--cc=sct@redhat.com \
--cc=sos22@srcf.ucam.org \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.