hw/input/hid: use qemu_input_handler_set_leds_mask() for LED state
Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Marc-André Lureau committed
Jun 9, 2026 at 01:11 UTC
26e368d8670efd97195d0df2fdb6e1befe02979b
1 file changed
+2
-1
hw/input/hid.c
+2
-1
@@ -25,6 +25,7 @@
25
26
#include "qemu/osdep.h"
27
#include "ui/console.h"
28
+#include "ui/input.h"
29
#include "qemu/timer.h"
30
#include "hw/input/hid.h"
31
#include "migration/vmstate.h"
@@ -470,7 +471,7 @@ int hid_keyboard_write(HIDState *hs, uint8_t *buf, int len)
471
if (hs->kbd.leds & 0x02) {
472
ledstate |= QEMU_CAPS_LOCK_LED;
473
}
473
- kbd_put_ledstate(ledstate);
474
+ qemu_input_handler_set_leds_mask(hs->s, ledstate);
475
return 1;
476
}
477
return 0;