]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
ui/keymaps: Use Linux key codes
authorAkihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Wed, 20 May 2026 06:48:06 +0000 (15:48 +0900)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Sun, 24 May 2026 22:01:35 +0000 (02:01 +0400)
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 <odaki@rsg.ci.i.u-tokyo.ac.jp>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260520-input-v3-23-7c9e4c7abe34@rsg.ci.i.u-tokyo.ac.jp>

ui/keymaps.c

index a448efab3202e4726ec072f9411ff7d39f84041e..d145b5dd3a8c0b885f08a749fc7c29f5d84267aa 100644 (file)
@@ -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];
             }