QemuInputEvent now stores Linux key codes for key events. Use those
codes directly instead of translating between internal key code
representations.

Signed-off-by: Akihiko Odaki <[email protected]>
---
 ui/keymaps.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ui/keymaps.c b/ui/keymaps.c
index 7a7c13c47a0c..ad54cbbc5c8c 100644
--- a/ui/keymaps.c
+++ b/ui/keymaps.c
@@ -255,9 +255,8 @@ int keysym2scancode(kbd_layout_t *k, int keysym,
          * On keyup: Try find a key which is actually down.
          */
         for (i = 0; i < keysym2code->count; i++) {
-            QKeyCode qcode = qemu_input_key_number_to_qcode
+            unsigned int lnx = qemu_input_key_number_to_linux
                 (keysym2code->keycodes[i]);
-            unsigned int lnx = qemu_input_map_qcode_to_linux[qcode];
             if (kbd && qkbd_state_key_get(kbd, lnx)) {
                 return keysym2code->keycodes[i];
             }

-- 
2.54.0


Reply via email to