@samitouri / QOSamiQemu / commits / f0fccade86

ui/keymaps: Use Linux key codes

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>

Akihiko Odaki committed May 20, 2026 at 15:48 UTC f0fccade86846ceb5e3fd5fa34077e3611ba71c7
1 file changed +1 -2
ui/keymaps.c
+1 -2
@@ -255,9 +255,8 @@ int keysym2scancode(kbd_layout_t *k, int keysym,
255 * On keyup: Try find a key which is actually down.
256 */
257 for (i = 0; i < keysym2code->count; i++) {
258 - QKeyCode qcode = qemu_input_key_number_to_qcode
258 + unsigned int lnx = qemu_input_key_number_to_linux
259 (keysym2code->keycodes[i]);
260 - unsigned int lnx = qemu_input_map_qcode_to_linux[qcode];
260 if (kbd && qkbd_state_key_get(kbd, lnx)) {
261 return keysym2code->keycodes[i];
262 }