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 userspace tools [2/6]

To: Jeremy Katz <katzj@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Paravirt framebuffer userspace tools [2/6]
From: Laurent Vivier <Laurent.Vivier@xxxxxxxx>
Date: Tue, 22 Aug 2006 11:44:06 +0200
Cc: Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, Anthony Liguori <aliguori@xxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Markus Armbruster <armbru@xxxxxxxxxx>, Christian Limpach <chris@xxxxxxxxxxxxx>
Delivery-date: Tue, 22 Aug 2006 02:44:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1155935111.11663.50.camel@xxxxxxxxxxxxxx>
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>
Organization: Bull S.A.S.
References: <1155935111.11663.50.camel@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.2 (X11/20060420)
Jeremy Katz wrote:
> Adds the basic userspace support for the VNC and SDL framebuffer pieces
> that run in dom0.  Slightly modified by me to add some option parsing
[...]
> +uint32_t gdk_linux_mapping[0x10000] = {
> +     [GDK_a] = KEY_A,
> +     [GDK_b] = KEY_B,
> +     [GDK_c] = KEY_C,
> +     [GDK_d] = KEY_D,
> +     [GDK_e] = KEY_E,
> +     [GDK_f] = KEY_F,
> +     [GDK_g] = KEY_G,
> +     [GDK_h] = KEY_H,
> +     [GDK_i] = KEY_I,
> +     [GDK_j] = KEY_J,
> +     [GDK_k] = KEY_K,
> +     [GDK_l] = KEY_L,
> +     [GDK_m] = KEY_M,
> +     [GDK_n] = KEY_N,
> +     [GDK_o] = KEY_O,
> +     [GDK_p] = KEY_P,
> +     [GDK_q] = KEY_Q,
> +     [GDK_r] = KEY_R,
> +     [GDK_s] = KEY_S,
> +     [GDK_t] = KEY_T,
> +     [GDK_u] = KEY_U,
> +     [GDK_v] = KEY_V,
> +     [GDK_w] = KEY_W,
> +     [GDK_x] = KEY_X,
> +     [GDK_y] = KEY_Y,
> +     [GDK_z] = KEY_Z,
> +     [GDK_A] = KEY_A,
> +     [GDK_B] = KEY_B,
> +     [GDK_C] = KEY_C,
> +     [GDK_D] = KEY_D,
> +     [GDK_E] = KEY_E,
> +     [GDK_F] = KEY_F,
> +     [GDK_G] = KEY_G,
> +     [GDK_H] = KEY_H,
> +     [GDK_I] = KEY_I,
> +     [GDK_J] = KEY_J,
> +     [GDK_K] = KEY_K,
> +     [GDK_L] = KEY_L,
> +     [GDK_M] = KEY_M,
> +     [GDK_N] = KEY_N,
> +     [GDK_O] = KEY_O,
> +     [GDK_P] = KEY_P,
> +     [GDK_Q] = KEY_Q,
> +     [GDK_R] = KEY_R,
> +     [GDK_S] = KEY_S,
> +     [GDK_T] = KEY_T,
> +     [GDK_U] = KEY_U,
> +     [GDK_V] = KEY_V,
> +     [GDK_W] = KEY_W,
> +     [GDK_X] = KEY_X,
> +     [GDK_Y] = KEY_Y,
> +     [GDK_Z] = KEY_Z,
> +     [GDK_0] = KEY_0,
> +     [GDK_1] = KEY_1,
> +     [GDK_2] = KEY_2,
> +     [GDK_3] = KEY_3,
> +     [GDK_4] = KEY_4,
> +     [GDK_5] = KEY_5,
> +     [GDK_6] = KEY_6,
> +     [GDK_7] = KEY_7,
> +     [GDK_8] = KEY_8,
> +     [GDK_9] = KEY_9,
> +     [GDK_Return] = KEY_ENTER,
> +     [GDK_BackSpace] = KEY_BACKSPACE,
> +     [GDK_Tab] = KEY_TAB,
> +     [GDK_Pause] = KEY_PAUSE,
> +     [GDK_Delete] = KEY_DELETE,
> +     [GDK_slash] = KEY_SLASH,
> +     [GDK_minus] = KEY_MINUS,
> +     [GDK_equal] = KEY_EQUAL,
> +     [GDK_Escape] = KEY_ESC,
> +     [GDK_braceleft] = KEY_LEFTBRACE,
> +     [GDK_braceright] = KEY_RIGHTBRACE,
> +     [GDK_bracketleft] = KEY_LEFTMETA,
> +     [GDK_bracketright] = KEY_RIGHTMETA,
> +     [GDK_Control_L] = KEY_LEFTCTRL,
> +     [GDK_Control_R] = KEY_RIGHTCTRL,
> +     [GDK_Shift_L] = KEY_LEFTSHIFT,
> +     [GDK_Shift_R] = KEY_RIGHTSHIFT,
> +     [GDK_Alt_L] = KEY_LEFTALT,
> +     [GDK_Alt_R] = KEY_RIGHTALT,
> +     [GDK_semicolon] = KEY_SEMICOLON, 
> +     [GDK_apostrophe] = KEY_APOSTROPHE,
> +     [GDK_grave] = KEY_GRAVE,
> +     [GDK_backslash] = KEY_BACKSLASH,
> +     [GDK_comma] = KEY_COMMA,
> +     [GDK_period] = KEY_DOT,
> +     [GDK_space] = KEY_SPACE,
> +     [GDK_Caps_Lock] = KEY_CAPSLOCK,
> +     [GDK_Num_Lock] = KEY_NUMLOCK,
> +     [GDK_Scroll_Lock] = KEY_SCROLLLOCK,
> +     [GDK_Sys_Req] = KEY_SYSRQ,
> +     [GDK_Linefeed] = KEY_LINEFEED,
> +     [GDK_Home] = KEY_HOME,
> +     [GDK_Pause] = KEY_PAUSE,
> +     [GDK_F1] = KEY_F1,
> +     [GDK_F2] = KEY_F2,
> +     [GDK_F3] = KEY_F3,
> +     [GDK_F4] = KEY_F4,
> +     [GDK_F5] = KEY_F5,
> +     [GDK_F6] = KEY_F6,
> +     [GDK_F7] = KEY_F7,
> +     [GDK_F8] = KEY_F8,
> +     [GDK_F9] = KEY_F9,
> +     [GDK_F10] = KEY_F10,
> +     [GDK_F11] = KEY_F11,
> +     [GDK_F12] = KEY_F12,
> +     [GDK_Up] = KEY_UP,
> +     [GDK_Page_Up] = KEY_PAGEUP,
> +     [GDK_Left] = KEY_LEFT,
> +     [GDK_Right] = KEY_RIGHT,
> +     [GDK_End] = KEY_END,
> +     [GDK_Down] = KEY_DOWN,
> +     [GDK_Page_Down] = KEY_PAGEDOWN,
> +     [GDK_Insert] = KEY_INSERT, 
> +     [GDK_colon] = KEY_SEMICOLON,
> +     [GDK_quotedbl] = KEY_APOSTROPHE,
> +     [GDK_less] = KEY_COMMA,
> +     [GDK_greater] = KEY_DOT,
> +     [GDK_question] = KEY_SLASH,
> +     [GDK_bar] = KEY_BACKSLASH,
> +     [GDK_asciitilde] = KEY_GRAVE,
> +     [GDK_exclam] = KEY_1,
> +     [GDK_at] = KEY_2,
> +     [GDK_numbersign] = KEY_3,
> +     [GDK_dollar] = KEY_4,
> +     [GDK_percent] = KEY_5,
> +     [GDK_asciicircum] = KEY_6,
> +     [GDK_ampersand] = KEY_7,
> +     [GDK_asterisk] = KEY_8,
> +     [GDK_parenleft] = KEY_9,
> +     [GDK_parenright] = KEY_0,
> +     [GDK_underscore] = KEY_MINUS,
> +     [GDK_plus] = KEY_EQUAL,
[...]

As I propose in a previous mail, we should use scancode instead of symbol id.

Why ?

Let me explain:

I use a french keyboard (sorry ;-) ) with a lot of symbols like "é", "è", "ç",
"à", "ù", and these symbols don't appear in your list.
Moreover some symbols are on the same key: "<" and ">" are on the same key on
french keyboard, whereas on an US keyboard they are on two different keys: how
to manage the shift key in this cases ?
The first keys on a french keyboard are: "AZ" whereas on an US keyboard it's
"QZ", so you translate the SDL symbol "A" to the kernel scancode "A" which is in
fact "Q"...
for the kernel, KEY_Q is the second key of the the second row, but on my
keyboard, the second key of the second row is "A", so if when I press "Q"
(GDK_Q), you send KEY_Q, (the 2nd key of the 2nd row) whereas I press the 2nd
key of the 3rd row (KEY_A).

So I think we should provide the scancode to the virtualized kernel (because
kernel manage scancode and not symbol) and let it to manage scancode/symbol id
translation using the standard mechanism (loadkeys at the console level, xkbd at
the X11 level, for instance).

Regards,
Laurent


-- 
------------------ Laurent Vivier -------------------
  mailto:Laurent.Vivier@xxxxxxxx BULL/FREC:B1-226
    phone: (+33) 476 29 7213  Bullcom: 229-7213
------------------[ DT/OSwR&D/AIX ]------------------
       "Any sufficiently advanced technology is
  indistinguishable from magic." -- Arthur C. Clarke

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>