From f0fccade86846ceb5e3fd5fa34077e3611ba71c7 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Wed, 20 May 2026 15:48:06 +0900 Subject: [PATCH] ui/keymaps: Use Linux key codes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Marc-André Lureau Message-ID: <20260520-input-v3-23-7c9e4c7abe34@rsg.ci.i.u-tokyo.ac.jp> --- ui/keymaps.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/keymaps.c b/ui/keymaps.c index a448efab32..d145b5dd3a 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]; }