[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/2] next-kbd: convert to use qemu_input_handler_register(
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v3 1/2] next-kbd: convert to use qemu_input_handler_register() |
Date: |
Tue, 5 Nov 2024 08:59:00 +0000 |
User-agent: |
Mutt/2.2.13 (2024-03-09) |
On Mon, Nov 04, 2024 at 10:51:53PM +0000, Mark Cave-Ayland wrote:
> On 04/11/2024 11:44, Daniel P. Berrangé wrote:
>
> > 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.
>
> Nice!
>
> > To use this from QEMU we would need:
> >
> > * update ui/keycodemapdb submodule hash to point to the above (once
> > merged)
> > * update ui/meson.build 'keymaps' list to add ['qcode', 'next'] to
> > the generated map list
> > * import the new generated "ui/input-keymap-qcode-to-next.c.inc" from
> > next-kbd.c
>
> What would you recommend would be the best way forward for 9.2? To issue a
> v4 with just the erroneous 0x00 values removed, or to try and use
> keycodemapdb?
Since we're at soft-freeze, best just todo a simple v4, and we can
do keycodemapdb in the next cycle.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
[PATCH v3 2/2] ui/input-legacy.c: remove unused legacy qemu_add_kbd_event_handler() function, Mark Cave-Ayland, 2024/11/01