提交 aaba6c15 编写于 作者: B bellard

win32: correct keycode remapping


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@710 c046a42c-6fe2-441c-8c8c-71466251a162
上级 38e205a2
......@@ -127,11 +127,18 @@ 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
if (keycode < 9) {
keycode = 0;
} else if (keycode < 97) {
keycode -= 8; /* just an offset */
} else if (keycode < 158) {
} else
#endif
if (keycode < 158) {
/* use conversion table */
keycode = x_keycode_to_pc_keycode[keycode - 97];
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册