WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Paravirt framebuffer backend tools [2/5]

To: "Stephen C. Tweedie" <sct@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Paravirt framebuffer backend tools [2/5]
From: Markus Armbruster <armbru@xxxxxxxxxx>
Date: Wed, 11 Oct 2006 15:49:47 +0200
Cc: Laurent Vivier <Laurent.Vivier@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Anthony Liguori <aliguori@xxxxxxxxxxxxx>, sos22@xxxxxxxxxxxxx, Jeremy Katz <katzj@xxxxxxxxxx>
Delivery-date: Wed, 11 Oct 2006 06:50:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1160499227.5951.35.camel@xxxxxxxxxxxxxxxxxxxxx> (Stephen C. Tweedie's message of "Tue, 10 Oct 2006 17:53:47 +0100")
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060904090150.GC4812@xxxxxxxxx> <44FC224D.3090300@xxxxxxxx> <20060906091505.GD3257@xxxxxxxxx> <44FEB3DE.5070502@xxxxxxxx> <20060906171006.GA5306@xxxxxxxxx> <44FFCAC0.6060809@xxxxxxxx> <20060907083848.GA3078@xxxxxxxxx> <45016F8E.1030300@xxxxxxxxxxxxx> <20060908141248.GA6845@xxxxxxxxx> <45017CCF.9050707@xxxxxxxxxxxxx> <87psd4ul5c.fsf@xxxxxxxxxxxxxxxxx> <1160499227.5951.35.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
"Stephen C. Tweedie" <sct@xxxxxxxxxx> 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?

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel