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 20060728 17:46:17.000000000 +0200
+++ sdlfb.c 20060728 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
signature.asc
Description: OpenPGP digital signature
_______________________________________________
Xendevel mailing list
Xendevel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xendevel
