From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: Re: [PATCH] Paravirt framebuffer userspace tools [2/6] Date: Tue, 22 Aug 2006 11:44:06 +0200 Message-ID: <44EAD1E6.4030607@bull.net> References: <1155935111.11663.50.camel@aglarond.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1822894617==" Return-path: In-Reply-To: <1155935111.11663.50.camel@aglarond.local> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Katz Cc: Ian Pratt , Anthony Liguori , xen-devel , Markus Armbruster , Christian Limpach List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============1822894617== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8CFDCC7554C6E0B0FAE62562" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8CFDCC7554C6E0B0FAE62562 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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] =3D { > + [GDK_a] =3D KEY_A, > + [GDK_b] =3D KEY_B, > + [GDK_c] =3D KEY_C, > + [GDK_d] =3D KEY_D, > + [GDK_e] =3D KEY_E, > + [GDK_f] =3D KEY_F, > + [GDK_g] =3D KEY_G, > + [GDK_h] =3D KEY_H, > + [GDK_i] =3D KEY_I, > + [GDK_j] =3D KEY_J, > + [GDK_k] =3D KEY_K, > + [GDK_l] =3D KEY_L, > + [GDK_m] =3D KEY_M, > + [GDK_n] =3D KEY_N, > + [GDK_o] =3D KEY_O, > + [GDK_p] =3D KEY_P, > + [GDK_q] =3D KEY_Q, > + [GDK_r] =3D KEY_R, > + [GDK_s] =3D KEY_S, > + [GDK_t] =3D KEY_T, > + [GDK_u] =3D KEY_U, > + [GDK_v] =3D KEY_V, > + [GDK_w] =3D KEY_W, > + [GDK_x] =3D KEY_X, > + [GDK_y] =3D KEY_Y, > + [GDK_z] =3D KEY_Z, > + [GDK_A] =3D KEY_A, > + [GDK_B] =3D KEY_B, > + [GDK_C] =3D KEY_C, > + [GDK_D] =3D KEY_D, > + [GDK_E] =3D KEY_E, > + [GDK_F] =3D KEY_F, > + [GDK_G] =3D KEY_G, > + [GDK_H] =3D KEY_H, > + [GDK_I] =3D KEY_I, > + [GDK_J] =3D KEY_J, > + [GDK_K] =3D KEY_K, > + [GDK_L] =3D KEY_L, > + [GDK_M] =3D KEY_M, > + [GDK_N] =3D KEY_N, > + [GDK_O] =3D KEY_O, > + [GDK_P] =3D KEY_P, > + [GDK_Q] =3D KEY_Q, > + [GDK_R] =3D KEY_R, > + [GDK_S] =3D KEY_S, > + [GDK_T] =3D KEY_T, > + [GDK_U] =3D KEY_U, > + [GDK_V] =3D KEY_V, > + [GDK_W] =3D KEY_W, > + [GDK_X] =3D KEY_X, > + [GDK_Y] =3D KEY_Y, > + [GDK_Z] =3D KEY_Z, > + [GDK_0] =3D KEY_0, > + [GDK_1] =3D KEY_1, > + [GDK_2] =3D KEY_2, > + [GDK_3] =3D KEY_3, > + [GDK_4] =3D KEY_4, > + [GDK_5] =3D KEY_5, > + [GDK_6] =3D KEY_6, > + [GDK_7] =3D KEY_7, > + [GDK_8] =3D KEY_8, > + [GDK_9] =3D KEY_9, > + [GDK_Return] =3D KEY_ENTER, > + [GDK_BackSpace] =3D KEY_BACKSPACE, > + [GDK_Tab] =3D KEY_TAB, > + [GDK_Pause] =3D KEY_PAUSE, > + [GDK_Delete] =3D KEY_DELETE, > + [GDK_slash] =3D KEY_SLASH, > + [GDK_minus] =3D KEY_MINUS, > + [GDK_equal] =3D KEY_EQUAL, > + [GDK_Escape] =3D KEY_ESC, > + [GDK_braceleft] =3D KEY_LEFTBRACE, > + [GDK_braceright] =3D KEY_RIGHTBRACE, > + [GDK_bracketleft] =3D KEY_LEFTMETA, > + [GDK_bracketright] =3D KEY_RIGHTMETA, > + [GDK_Control_L] =3D KEY_LEFTCTRL, > + [GDK_Control_R] =3D KEY_RIGHTCTRL, > + [GDK_Shift_L] =3D KEY_LEFTSHIFT, > + [GDK_Shift_R] =3D KEY_RIGHTSHIFT, > + [GDK_Alt_L] =3D KEY_LEFTALT, > + [GDK_Alt_R] =3D KEY_RIGHTALT, > + [GDK_semicolon] =3D KEY_SEMICOLON,=20 > + [GDK_apostrophe] =3D KEY_APOSTROPHE, > + [GDK_grave] =3D KEY_GRAVE, > + [GDK_backslash] =3D KEY_BACKSLASH, > + [GDK_comma] =3D KEY_COMMA, > + [GDK_period] =3D KEY_DOT, > + [GDK_space] =3D KEY_SPACE, > + [GDK_Caps_Lock] =3D KEY_CAPSLOCK, > + [GDK_Num_Lock] =3D KEY_NUMLOCK, > + [GDK_Scroll_Lock] =3D KEY_SCROLLLOCK, > + [GDK_Sys_Req] =3D KEY_SYSRQ, > + [GDK_Linefeed] =3D KEY_LINEFEED, > + [GDK_Home] =3D KEY_HOME, > + [GDK_Pause] =3D KEY_PAUSE, > + [GDK_F1] =3D KEY_F1, > + [GDK_F2] =3D KEY_F2, > + [GDK_F3] =3D KEY_F3, > + [GDK_F4] =3D KEY_F4, > + [GDK_F5] =3D KEY_F5, > + [GDK_F6] =3D KEY_F6, > + [GDK_F7] =3D KEY_F7, > + [GDK_F8] =3D KEY_F8, > + [GDK_F9] =3D KEY_F9, > + [GDK_F10] =3D KEY_F10, > + [GDK_F11] =3D KEY_F11, > + [GDK_F12] =3D KEY_F12, > + [GDK_Up] =3D KEY_UP, > + [GDK_Page_Up] =3D KEY_PAGEUP, > + [GDK_Left] =3D KEY_LEFT, > + [GDK_Right] =3D KEY_RIGHT, > + [GDK_End] =3D KEY_END, > + [GDK_Down] =3D KEY_DOWN, > + [GDK_Page_Down] =3D KEY_PAGEDOWN, > + [GDK_Insert] =3D KEY_INSERT,=20 > + [GDK_colon] =3D KEY_SEMICOLON, > + [GDK_quotedbl] =3D KEY_APOSTROPHE, > + [GDK_less] =3D KEY_COMMA, > + [GDK_greater] =3D KEY_DOT, > + [GDK_question] =3D KEY_SLASH, > + [GDK_bar] =3D KEY_BACKSLASH, > + [GDK_asciitilde] =3D KEY_GRAVE, > + [GDK_exclam] =3D KEY_1, > + [GDK_at] =3D KEY_2, > + [GDK_numbersign] =3D KEY_3, > + [GDK_dollar] =3D KEY_4, > + [GDK_percent] =3D KEY_5, > + [GDK_asciicircum] =3D KEY_6, > + [GDK_ampersand] =3D KEY_7, > + [GDK_asterisk] =3D KEY_8, > + [GDK_parenleft] =3D KEY_9, > + [GDK_parenright] =3D KEY_0, > + [GDK_underscore] =3D KEY_MINUS, > + [GDK_plus] =3D 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 "=E9", "=E8= ", "=E7", "=E0", "=F9", and these symbols don't appear in your list. Moreover some symbols are on the same key: "<" and ">" are on the same ke= y 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 i= t's "QZ", so you translate the SDL symbol "A" to the kernel scancode "A" whic= h 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 (beca= use kernel manage scancode and not symbol) and let it to manage scancode/symb= ol id translation using the standard mechanism (loadkeys at the console level, = xkbd at the X11 level, for instance). Regards, Laurent --=20 ------------------ 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 --------------enig8CFDCC7554C6E0B0FAE62562 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.7 (GNU/Linux) iD8DBQFE6tHr9Kffa9pFVzwRAqMaAKCANH1A3ReQChj9P86yzev0ezgnGwCgj+UV HPBfcTJCVCMISwZwko60g8w= =mlOm -----END PGP SIGNATURE----- --------------enig8CFDCC7554C6E0B0FAE62562-- --===============1822894617== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1822894617==--