|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH RFC 09/28] hw/display/xenfb: 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@xxxxxxxxxxxxxxxxxxxxxx>
---
hw/display/xenfb.c | 21 +++------------------
1 file changed, 3 insertions(+), 18 deletions(-)
diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index 9bf89a1e6223..ee23c483499f 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -191,29 +191,14 @@ static int xenfb_send_position(struct XenInput *xenfb,
return xenfb_kbd_event(xenfb, &event);
}
-/*
- * Send a key event from the client to the guest OS
- * QEMU gives us a QCode.
- * We have to turn this into a Linux Input layer keycode.
- *
- * Wish we could just send scancodes straight to the guest which
- * already has code for dealing with this...
- */
+/* Send a key event from the client to the guest OS */
static void xenfb_key_event(DeviceState *dev, QemuConsole *src,
QemuInputEvent *evt)
{
struct XenInput *xenfb = (struct XenInput *)dev;
- int qcode = qemu_input_linux_to_qcode(evt->key.key);
- int lnx;
- if (qcode < qemu_input_map_qcode_to_linux_len) {
- lnx = qemu_input_map_qcode_to_linux[qcode];
-
- if (lnx) {
- trace_xenfb_key_event(xenfb, lnx, evt->key.down);
- xenfb_send_key(xenfb, evt->key.down, lnx);
- }
- }
+ trace_xenfb_key_event(xenfb, evt->key.key, evt->key.down);
+ xenfb_send_key(xenfb, evt->key.down, evt->key.key);
}
/*
--
2.54.0
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |