mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
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>
This commit is contained in:
committed by
Marc-André Lureau
parent
065757f7c8
commit
f0fccade86
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user