ui/dbus: 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-18-7c9e4c7abe34@rsg.ci.i.u-tokyo.ac.jp>
This commit is contained in:
committed by
Marc-André Lureau
parent
61ac2f10b8
commit
bd61bc0e9e
@@ -339,11 +339,11 @@ dbus_kbd_press(DBusDisplayConsole *ddc,
|
||||
GDBusMethodInvocation *invocation,
|
||||
guint arg_keycode)
|
||||
{
|
||||
QKeyCode qcode = qemu_input_key_number_to_qcode(arg_keycode);
|
||||
unsigned int lnx = qemu_input_key_number_to_linux(arg_keycode);
|
||||
|
||||
trace_dbus_kbd_press(arg_keycode);
|
||||
|
||||
qkbd_state_key_event(ddc->kbd, qemu_input_map_qcode_to_linux[qcode], true);
|
||||
qkbd_state_key_event(ddc->kbd, lnx, true);
|
||||
|
||||
qemu_dbus_display1_keyboard_complete_press(ddc->iface_kbd, invocation);
|
||||
|
||||
@@ -355,11 +355,11 @@ dbus_kbd_release(DBusDisplayConsole *ddc,
|
||||
GDBusMethodInvocation *invocation,
|
||||
guint arg_keycode)
|
||||
{
|
||||
QKeyCode qcode = qemu_input_key_number_to_qcode(arg_keycode);
|
||||
unsigned int lnx = qemu_input_key_number_to_linux(arg_keycode);
|
||||
|
||||
trace_dbus_kbd_release(arg_keycode);
|
||||
|
||||
qkbd_state_key_event(ddc->kbd, qemu_input_map_qcode_to_linux[qcode], false);
|
||||
qkbd_state_key_event(ddc->kbd, lnx, false);
|
||||
|
||||
qemu_dbus_display1_keyboard_complete_release(ddc->iface_kbd, invocation);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user