@samitouri / QOSamiQemu / commits / 023b08f336

ui/input: Prohibit sending KEY_RESERVED

xenfb and virtio-input no longer need key mapping because they operate on Linux key codes, but removing the key mapping code loses the ability to filter out KEY_RESERVED. Drop KEY_RESERVED at the common input event entry point so the logic is shared by both devices and no downstream input handler receives KEY_RESERVED accidentally. 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-5-7c9e4c7abe34@rsg.ci.i.u-tokyo.ac.jp>

Akihiko Odaki committed May 20, 2026 at 15:47 UTC 023b08f33603342d1af9cd63400c90e52899a370
1 file changed +4
ui/input.c
+4
@@ -328,6 +328,10 @@ void qemu_input_event_send_impl(QemuConsole *src, QemuInputEvent *evt)
328
329 void qemu_input_event_send(QemuConsole *src, QemuInputEvent *evt)
330 {
331 + if (evt->type == INPUT_EVENT_KIND_KEY && !evt->key.key) {
332 + return;
333 + }
334 +
335 if (!runstate_is_running() && !runstate_check(RUN_STATE_SUSPENDED)) {
336 return;
337 }