]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
ui/spice: Use Linux key codes
authorAkihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
Wed, 20 May 2026 06:48:08 +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-25-7c9e4c7abe34@rsg.ci.i.u-tokyo.ac.jp>

ui/spice-input.c

index a5c5d78474e7b58947397bae0779cc09749a357b..f0bb915fd77b0cb247a9dae7bb677460e6ab9f63 100644 (file)
@@ -20,6 +20,7 @@
 #include <spice.h>
 #include <spice/enums.h>
 
+#include "standard-headers/linux/input-event-codes.h"
 #include "ui/qemu-spice.h"
 #include "ui/console.h"
 #include "keymaps.h"
@@ -61,7 +62,7 @@ static void kbd_push_key(SpiceKbdInstance *sin, uint8_t scancode)
     if (scancode == pauseseq[kbd->pauseseq]) {
         kbd->pauseseq++;
         if (kbd->pauseseq == G_N_ELEMENTS(pauseseq)) {
-            qemu_input_event_send_key_qcode(NULL, Q_KEY_CODE_PAUSE, true);
+            qemu_input_event_send_key_linux(NULL, KEY_PAUSE, true);
             kbd->pauseseq = 0;
         }
         return;