All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Vivier <Laurent.Vivier@bull.net>
To: Markus Armbruster <armbru@redhat.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Re: [PATCH 2/2] Virtual frame buffer: user space backend
Date: Fri, 28 Jul 2006 17:55:54 +0200	[thread overview]
Message-ID: <44CA338A.8010302@bull.net> (raw)
In-Reply-To: <87lkr53msl.fsf@pike.pond.sub.org>


[-- Attachment #1.1: Type: text/plain, Size: 4004 bytes --]

Hi,

sdlfb has some problems to correctly identify keys on my french keyboard.

A use of SDL scancode instead of SDL symbol id corrects this problem.

I propose following modification:

--- sdlfb.c.org	2006-07-28 17:46:17.000000000 +0200
+++ sdlfb.c	2006-07-28 17:40:53.000000000 +0200
@@ -22,52 +22,111 @@ void sdl_update(struct xenfb *xenfb, int
 }

 int sdl2linux[1024] = {
-	[SDLK_a] = KEY_A,
-	[SDLK_b] = KEY_B,
-	[SDLK_c] = KEY_C,
-	[SDLK_d] = KEY_D,
-	[SDLK_e] = KEY_E,
-	[SDLK_f] = KEY_F,
-	[SDLK_g] = KEY_G,
-	[SDLK_h] = KEY_H,
-	[SDLK_i] = KEY_I,
-	[SDLK_j] = KEY_J,
-	[SDLK_k] = KEY_K,
-	[SDLK_l] = KEY_L,
-	[SDLK_m] = KEY_M,
-	[SDLK_n] = KEY_N,
-	[SDLK_o] = KEY_O,
-	[SDLK_p] = KEY_P,
-	[SDLK_q] = KEY_Q,
-	[SDLK_r] = KEY_R,
-	[SDLK_s] = KEY_S,
-	[SDLK_t] = KEY_T,
-	[SDLK_u] = KEY_U,
-	[SDLK_v] = KEY_V,
-	[SDLK_w] = KEY_W,
-	[SDLK_x] = KEY_X,
-	[SDLK_y] = KEY_Y,
-	[SDLK_z] = KEY_Z,
-	[SDLK_0] = KEY_0,
-	[SDLK_1] = KEY_1,
-	[SDLK_2] = KEY_2,
-	[SDLK_3] = KEY_3,
-	[SDLK_4] = KEY_4,
-	[SDLK_5] = KEY_5,
-	[SDLK_6] = KEY_6,
-	[SDLK_7] = KEY_7,
-	[SDLK_8] = KEY_8,
-	[SDLK_9] = KEY_9,
-	[SDLK_SPACE] = KEY_SPACE,
-	[SDLK_RETURN] = KEY_ENTER,
-	[SDLK_PERIOD] = KEY_DOT,
-	[SDLK_SLASH] = KEY_SLASH,
-	[SDLK_BACKSPACE] = KEY_BACKSPACE,
-	[SDLK_TAB] = KEY_TAB,
-	[SDLK_LSHIFT] = KEY_LEFTSHIFT,
-	[SDLK_RSHIFT] = KEY_RIGHTSHIFT,
-	[SDLK_LALT] = KEY_LEFTALT,
-	[SDLK_RALT] = KEY_RIGHTALT,
+	[9] = KEY_ESC,
+	[67] = KEY_F1,
+	[68] = KEY_F2,
+	[69] = KEY_F3,
+	[70] = KEY_F4,
+	[71] = KEY_F5,
+	[72] = KEY_F6,
+	[73] = KEY_F7,
+	[74] = KEY_F8,
+	[75] = KEY_F9,
+	[76] = KEY_F10,
+	[95] = KEY_F11,
+	[96] = KEY_F12,
+	[78] = KEY_SCROLLLOCK,
+	[49] = KEY_GRAVE,
+	[10] = KEY_1,
+	[11] = KEY_2,
+	[12] = KEY_3,
+	[13] = KEY_4,
+	[14] = KEY_5,
+	[15] = KEY_6,
+	[16] = KEY_7,
+	[17] = KEY_8,
+	[18] = KEY_9,
+	[19] = KEY_0,
+	[20] = KEY_MINUS,
+	[21] = KEY_EQUAL,
+	[22] = KEY_BACKSPACE,
+	[106] = KEY_INSERT,
+	[97] = KEY_HOME,
+	[99] = KEY_UP,
+	[77] = KEY_NUMLOCK,
+	[23] = KEY_TAB,
+	[24] = KEY_Q,
+	[25] = KEY_W,
+	[26] = KEY_E,
+	[27] = KEY_R,
+	[28] = KEY_T,
+	[29] = KEY_Y,
+	[30] = KEY_U,
+	[31] = KEY_I,
+	[32] = KEY_O,
+	[33] = KEY_P,
+	[34] = KEY_LEFTBRACE,
+	[35] = KEY_RIGHTBRACE,
+	[36] = KEY_ENTER,
+	[38] = KEY_A,
+	[39] = KEY_S,
+	[40] = KEY_D,
+	[41] = KEY_F,
+	[42] = KEY_G,
+	[43] = KEY_H,
+	[44] = KEY_J,
+	[45] = KEY_K,
+	[46] = KEY_L,
+	[47] = KEY_SEMICOLON,
+	[48] = KEY_APOSTROPHE,
+	[52] = KEY_Z,
+	[53] = KEY_X,
+	[54] = KEY_C,
+	[55] = KEY_V,
+	[56] = KEY_B,
+	[57] = KEY_N,
+	[58] = KEY_M,
+	[59] = KEY_COMMA,
+	[60] = KEY_DOT,
+	[61] = KEY_SLASH,
+	[62] = KEY_RIGHTSHIFT,
+	[51] = KEY_BACKSLASH,
+	[112] = KEY_KPSLASH,
+	[63] = KEY_KPASTERISK,
+	[82] = KEY_KPMINUS,
+	[110] = KEY_PAUSE,
+	[111] = KEY_BREAK,
+	[107] = KEY_DELETE,
+	[103] = KEY_END,
+	[105] = KEY_PAGEDOWN,
+	[79] = KEY_KP7,
+	[80] = KEY_KP8,
+	[81] = KEY_KP9,
+	[86] = KEY_KPPLUS,
+	[66] = KEY_CAPSLOCK,
+	[83] = KEY_KP4,
+	[84] = KEY_KP5,
+	[85] = KEY_KP6,
+	[50] = KEY_LEFTSHIFT,
+	[94] = KEY_COMPOSE,
+	[98] = KEY_UP,
+	[87] = KEY_KP1,
+	[88] = KEY_KP2,
+	[89] = KEY_KP3,
+	[108] = KEY_KPENTER,
+	[37] = KEY_LEFTCTRL,
+	[115] = KEY_LEFTMETA,
+	[64] = KEY_LEFTALT,
+	[65] = KEY_SPACE,
+	[113] = KEY_RIGHTALT,
+	[116] = KEY_RIGHTMETA,
+	//[117] Menu ?
+	[109] = KEY_RIGHTCTRL,
+	[100] = KEY_LEFT,
+	[104] = KEY_DOWN,
+	[102] = KEY_RIGHT,
+	[90] = KEY_KP0,
+	[91] = KEY_KPDOT,
 };

 int main(int argc, char **argv)
@@ -128,7 +187,7 @@ int main(int argc, char **argv)
 			case SDL_KEYUP:
 				xenfb_send_key(xenfb,
 					       event.type == SDL_KEYDOWN,
-					       sdl2linux[event.key.keysym.sym]);
+					       sdl2linux[event.key.keysym.scancode]);
 				break;
 			case SDL_MOUSEMOTION: {
 				int x, y;


Regards,
Laurent
-- 
Laurent Vivier
Bull, Architect of an Open World (TM)
http://www.bullopensource.org/ext4


[-- 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

  reply	other threads:[~2006-07-28 15:55 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-26 13:38 [PATCH 0/2] Virtual frame buffer Markus Armbruster
2006-06-26 13:39 ` [PATCH 1/2] Virtual frame buffer: frontend Markus Armbruster
2006-07-07  7:18   ` Markus Armbruster
2006-07-07 16:45   ` Christian Limpach
2006-07-10  7:37     ` Markus Armbruster
2006-07-10 10:57       ` Christian Limpach
2006-07-10 18:29     ` Markus Armbruster
2006-07-26 20:28       ` Christian Limpach
2006-07-27  5:11         ` Markus Armbruster
2006-07-27  7:26           ` Gerd Hoffmann
2006-08-04  8:00           ` Markus Armbruster
2006-08-04  8:34             ` Christian Limpach
2006-07-28 13:52   ` Laurent Vivier
2006-08-04  7:54     ` Markus Armbruster
2006-06-26 13:40 ` [PATCH 2/2] Virtual frame buffer: user space backend Markus Armbruster
2006-07-07  7:18   ` Markus Armbruster
2006-07-28 15:55     ` Laurent Vivier [this message]
2006-08-04  7:57       ` Markus Armbruster
2006-07-07 16:57   ` Christian Limpach
2006-07-07 17:31     ` Anthony Liguori
2006-07-07 18:33       ` Christian Limpach
2006-07-07 18:50         ` Anthony Liguori
2006-07-07 22:50           ` Christian Limpach
2006-07-07 23:05             ` Anthony Liguori
2006-07-08  1:10               ` Christian Limpach
2006-07-08  1:49                 ` Anthony Liguori
2006-07-08 10:20                   ` Christian Limpach
2006-07-08  0:35             ` Rik van Riel
2006-07-08  1:38               ` Christian Limpach
2006-07-10  7:37     ` Markus Armbruster
2006-07-10 18:29     ` Markus Armbruster
2006-07-07  7:17 ` [PATCH 0/2] Virtual frame buffer Markus Armbruster
  -- strict thread matches above, loose matches on Subject: below --
2006-07-07 19:56 Re: [PATCH 2/2] Virtual frame buffer: user space backend Ian Pratt
2006-07-09  0:22 Ian Pratt

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=44CA338A.8010302@bull.net \
    --to=laurent.vivier@bull.net \
    --cc=armbru@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.