From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
peter.maydell@linaro.org, huth@tuxfamily.org,
qemu-devel@nongnu.org
Subject: Re: [PATCH v3 1/2] next-kbd: convert to use qemu_input_handler_register()
Date: Mon, 4 Nov 2024 11:44:30 +0000 [thread overview]
Message-ID: <ZyizniWmccEjAQBq@redhat.com> (raw)
In-Reply-To: <ZyicQT4eKlN07AHz@redhat.com>
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.
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
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 :|
next prev parent reply other threads:[~2024-11-04 11:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 20:11 [PATCH v3 0/2] next-kbd: convert to use qemu_input_handler_register() Mark Cave-Ayland
2024-11-01 20:11 ` [PATCH v3 1/2] " Mark Cave-Ayland
2024-11-02 8:27 ` Thomas Huth
2024-11-04 10:04 ` Daniel P. Berrangé
2024-11-04 11:44 ` Daniel P. Berrangé [this message]
2024-11-04 22:51 ` Mark Cave-Ayland
2024-11-05 8:59 ` Daniel P. Berrangé
2024-11-04 20:44 ` Thomas Huth
2024-11-04 22:46 ` Mark Cave-Ayland
2024-11-05 9:04 ` Daniel P. Berrangé
2024-11-01 20:11 ` [PATCH v3 2/2] ui/input-legacy.c: remove unused legacy qemu_add_kbd_event_handler() function Mark Cave-Ayland
2024-11-03 11:40 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZyizniWmccEjAQBq@redhat.com \
--to=berrange@redhat.com \
--cc=huth@tuxfamily.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).