On Mon, Nov 04, 2024 at 10:04:49AM +0000, Daniel P. Berrangé wrote:
On Fri, Nov 01, 2024 at 08:11:05PM +0000, Mark Cave-Ayland wrote:
Convert the next-kbd device from the legacy UI qemu_add_kbd_event_handler()
function to use qemu_input_handler_register().
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
hw/m68k/next-kbd.c | 166 ++++++++++++++++++++++++++++++---------------
1 file changed, 111 insertions(+), 55 deletions(-)
diff --git a/hw/m68k/next-kbd.c b/hw/m68k/next-kbd.c
index bc67810f31..283e98e9eb 100644
--- a/hw/m68k/next-kbd.c
+++ b/hw/m68k/next-kbd.c
Finding a reliable reference for the NeXT scancodes is very hard
in my googling so far. The best I've come across so far is
https://github.com/spenczar/usb-next/blob/main/keymap.h
who has defined a mapping to USB HID codes, which seems to
broadly match what's above here, plus has many of the gaps
fixed.
Do you know of any other decent references for scancodes ?
I'm going to see about adding NeXT scancodes to the giant
database of keycodes at:
https://gitlab.com/keycodemap/keycodemapdb
then we can auto-generate this table as we do for most of
the other QEMU keyboard drivers.
FYI, I've opened this:
https://gitlab.com/keycodemap/keycodemapdb/-/merge_requests/21
if someone wants to sanity-check it, please comment there. Otherwise I'll
merge it after a short while if no one points out mistakes.