From b71e95fc2c030428c768de20332f9d857b9aed41 Mon Sep 17 00:00:00 2001 From: bellard Date: Thu, 20 May 2004 13:08:06 +0000 Subject: win32 patch (kazu) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@829 c046a42c-6fe2-441c-8c8c-71466251a162 --- sdl.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'sdl.c') diff --git a/sdl.c b/sdl.c index ee809da..7b3c3b5 100644 --- a/sdl.c +++ b/sdl.c @@ -87,20 +87,20 @@ static const uint32_t x_keycode_to_pc_keycode[61] = { 0x0, /* 117 */ 0x0, /* 118 */ 0x0, /* 119 */ - 0x0, /* 120 */ + 0x70, /* 120 Hiragana_Katakana */ 0x0, /* 121 */ 0x0, /* 122 */ - 0x0, /* 123 */ + 0x73, /* 123 backslash */ 0x0, /* 124 */ 0x0, /* 125 */ 0x0, /* 126 */ 0x0, /* 127 */ 0x0, /* 128 */ - 0x0, /* 129 */ + 0x79, /* 129 Henkan */ 0x0, /* 130 */ - 0x0, /* 131 */ + 0x7b, /* 131 Muhenkan */ 0x0, /* 132 */ - 0x0, /* 133 */ + 0x7d, /* 133 Yen */ 0x0, /* 134 */ 0x0, /* 135 */ 0x47, /* 136 KP_7 */ @@ -133,23 +133,19 @@ static void sdl_process_key(SDL_KeyboardEvent *ev) /* XXX: not portable, but avoids complicated mappings */ keycode = ev->keysym.scancode; -#ifdef _WIN32 - if (keycode < 97) { - /* nothing to do */ - } else -#else + +#ifndef _WIN32 if (keycode < 9) { keycode = 0; } else if (keycode < 97) { keycode -= 8; /* just an offset */ - } else -#endif - if (keycode < 158) { + } else if (keycode < 158) { /* use conversion table */ keycode = x_keycode_to_pc_keycode[keycode - 97]; } else { keycode = 0; } +#endif /* now send the key code */ while (keycode != 0) { -- cgit v1.1