From: Laurent Vivier <Laurent.Vivier@bull.net>
To: Jeremy Katz <katzj@redhat.com>
Cc: Ian Pratt <ian.pratt@xensource.com>,
Anthony Liguori <aliguori@us.ibm.com>,
xen-devel <xen-devel@lists.xensource.com>,
Markus Armbruster <armbru@redhat.com>,
Christian Limpach <chris@xensource.com>
Subject: Re: [PATCH] Paravirt framebuffer userspace tools [2/6]
Date: Tue, 22 Aug 2006 11:44:06 +0200 [thread overview]
Message-ID: <44EAD1E6.4030607@bull.net> (raw)
In-Reply-To: <1155935111.11663.50.camel@aglarond.local>
[-- Attachment #1.1: Type: text/plain, Size: 5323 bytes --]
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@bull.net 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 #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
prev parent reply other threads:[~2006-08-22 9:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-18 21:05 [PATCH] Paravirt framebuffer userspace tools [2/6] Jeremy Katz
2006-08-22 9:44 ` Laurent Vivier [this message]
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=44EAD1E6.4030607@bull.net \
--to=laurent.vivier@bull.net \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=chris@xensource.com \
--cc=ian.pratt@xensource.com \
--cc=katzj@redhat.com \
--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.