From: Gerd Hoffmann <kraxel@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Programmingkid <programmingkidx@gmail.com>,
qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] hw/input/adb.c: Replace pc_to_adb_keycode with more detailed array
Date: Wed, 02 Mar 2016 17:10:34 +0100 [thread overview]
Message-ID: <1456935034.23994.136.camel@redhat.com> (raw)
In-Reply-To: <CAFEAcA8MriqcHUWJqtjaxchc+-4BkUP36VtNvFRqStv5nRzLnw@mail.gmail.com>
Hi,
> In any case this whole array ought at some point to be
> replaced with a Q_KEY code to ADB code lookup -- at the
> moment we will convert Q_KEY to pc scancode to ADB code,
> which is unfortunate if the pc scancodes don't include
> some keys that ADB and the host keyboard do. (In fact,
> wasn't this the reason why you wanted to do these patches?)
/me suggests:
Step #1: convert adb.c to the new input api, check "commit 66e6536
input: switch ps/2 kbd to new input api" how to do it.
Step #2: remove pc scancodes from translation, by moving from
qemu_input_key_value_to_scancode to qemu_input_key_value_to_qcode and
replacing the pc_to_adb_keycode[] map by a qcode_to_adb_keycode map.
Which will also simplify the lookup because you don't have to worry
about extended keycodes (scancode == 0xe0) any more.
You might also inspect commit "65e7545 input: switch sparc32 kbd to new
input api" which does the same for sparc (with both steps in one
commit).
cheers,
Gerd
prev parent reply other threads:[~2016-03-02 16:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 22:10 [Qemu-devel] [PATCH] hw/input/adb.c: Replace pc_to_adb_keycode with more detailed array Programmingkid
2016-03-01 23:34 ` Peter Maydell
2016-03-02 0:31 ` Programmingkid
2016-03-02 12:38 ` Peter Maydell
2016-03-02 15:17 ` Programmingkid
2016-03-02 16:10 ` Gerd Hoffmann [this message]
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=1456935034.23994.136.camel@redhat.com \
--to=kraxel@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=programmingkidx@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.