@samitouri / QOSamiQemu / commits / 0283b5cff2

ui/spice: 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-25-7c9e4c7abe34@rsg.ci.i.u-tokyo.ac.jp>

Akihiko Odaki committed May 20, 2026 at 15:48 UTC 0283b5cff2ebbf760cb3eded1d2390ba90254c36
1 file changed +2 -1
ui/spice-input.c
+2 -1
@@ -20,6 +20,7 @@
20 #include <spice.h>
21 #include <spice/enums.h>
22
23 +#include "standard-headers/linux/input-event-codes.h"
24 #include "ui/qemu-spice.h"
25 #include "ui/console.h"
26 #include "keymaps.h"
@@ -61,7 +62,7 @@ static void kbd_push_key(SpiceKbdInstance *sin, uint8_t scancode)
62 if (scancode == pauseseq[kbd->pauseseq]) {
63 kbd->pauseseq++;
64 if (kbd->pauseseq == G_N_ELEMENTS(pauseseq)) {
64 - qemu_input_event_send_key_qcode(NULL, Q_KEY_CODE_PAUSE, true);
65 + qemu_input_event_send_key_linux(NULL, KEY_PAUSE, true);
66 kbd->pauseseq = 0;
67 }
68 return;