From: Stefan Weil <sw@weilnetz.de>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-stable@nongnu.org, Stefan Weil <sw@weilnetz.de>
Subject: [Qemu-devel] [PATCH] mainstone: Fix duplicate array values for key 'space'
Date: Sun, 22 Dec 2013 15:11:36 +0100 [thread overview]
Message-ID: <1387721496-28197-1-git-send-email-sw@weilnetz.de> (raw)
cgcc reported a duplicate initialisation. Mainstone includes a matrix
keyboard where two different positions map to 'space'.
QEMU uses the reversed mapping and cannot map 'space' to two different
matrix positions.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
Of course we could also randomly select one of the two matrix positions,
but I assume that this is not necessary.
I don't know any mainstone internals, so I had to look into the Linux
code where I noticed some discrepancies which should be clarified:
Extract from Linux:
KEY(1, 5, KEY_LEFTSHIFT),
KEY(2, 5, KEY_SPACE),
KEY(3, 5, KEY_SPACE),
KEY(4, 5, KEY_ENTER),
KEY(5, 5, KEY_BACKSPACE),
Extract from QEMU:
[0x2a] = {5,1}, /* shift */
[0x39] = {5,2}, /* space */
[0x39] = {5,3}, /* space */
[0x1c] = {5,5}, /* enter */
It looks like the 'enter' key is not mapped correctly,
and 'backspace' is missing.
Regards,
Stefan
hw/arm/mainstone.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 9402c84..223a4b1 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -76,7 +76,9 @@ static struct keymap map[0xE0] = {
[0xc7] = {5,0}, /* Home */
[0x2a] = {5,1}, /* shift */
[0x39] = {5,2}, /* space */
+#if 0 /* always map to first column, row pair */
[0x39] = {5,3}, /* space */
+#endif
[0x1c] = {5,5}, /* enter */
[0xc8] = {6,0}, /* up */
[0xd0] = {6,1}, /* down */
--
1.7.10.4
next reply other threads:[~2013-12-22 14:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-22 14:11 Stefan Weil [this message]
2013-12-22 15:42 ` [Qemu-devel] [PATCH] mainstone: Fix duplicate array values for key 'space' Peter Maydell
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=1387721496-28197-1-git-send-email-sw@weilnetz.de \
--to=sw@weilnetz.de \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).