[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 16/17] mainstone: Fix duplicate array values for ke
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 16/17] mainstone: Fix duplicate array values for key 'space' |
Date: |
Sat, 28 Dec 2013 02:07:29 +0400 |
From: Stefan Weil <address@hidden>
cgcc reported a duplicate initialisation. Mainstone includes a matrix
keyboard where two different positions map to 'space'.
QEMU uses the reversed mapping and does not map 'space' to two different
matrix positions.
Some other keys are either missing or might be mapped wrongly (cf. Linux
kernel code). Don't fix these until someone can test them with real
hardware, but add TODO comments.
Signed-off-by: Stefan Weil <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
hw/arm/mainstone.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
index 276e359..d8e075e 100644
--- a/hw/arm/mainstone.c
+++ b/hw/arm/mainstone.c
@@ -75,9 +75,18 @@ static const struct keymap map[0xE0] = {
[0x2c] = {4,3}, /* z */
[0xc7] = {5,0}, /* Home */
[0x2a] = {5,1}, /* shift */
- [0x39] = {5,2}, /* space */
+ /*
+ * There are two matrix positions which map to space,
+ * but QEMU can only use one of them for the reverse
+ * mapping, so simply use the second one.
+ */
+ /* [0x39] = {5,2}, space */
[0x39] = {5,3}, /* space */
- [0x1c] = {5,5}, /* enter */
+ /*
+ * Matrix position {5,4} and other keys are missing here.
+ * TODO: Compare with Linux code and test real hardware.
+ */
+ [0x1c] = {5,5}, /* enter (TODO: might be wrong) */
[0xc8] = {6,0}, /* up */
[0xd0] = {6,1}, /* down */
[0xcb] = {6,2}, /* left */
--
1.7.10.4
- [Qemu-trivial] [PULL 02/17] openrisc: Fix spelling in comment (transaltion -> translation), (continued)
- [Qemu-trivial] [PULL 02/17] openrisc: Fix spelling in comment (transaltion -> translation), Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 08/17] vl: make boot_strict variable static (not used outside vl.c), Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 15/17] pxa27x: Add 'const' attribute to keyboard maps, Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 06/17] linux-user: Use macro TARGET_NSIG_WORDS where possible, Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 11/17] configure: Rewrite code for help message, Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 12/17] configure: Python tests must be done before help message, Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 09/17] fix -boot strict regressed in commit 6ef4716, Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 17/17] acpi unit-test: Remove temporary disk after test, Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 04/17] ui/cocoa: Use macro ARRAY_SIZE where possible, Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 14/17] pxa27x: Reduce size of keyboard matrix mapping, Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 16/17] mainstone: Fix duplicate array values for key 'space',
Michael Tokarev <=
- [Qemu-trivial] [PULL 13/17] doc: Mention chardev:id in available devices for -serial, Michael Tokarev, 2013/12/27
- [Qemu-trivial] [PULL 10/17] target-m68k: Replace qemu_assert by hw_error, Michael Tokarev, 2013/12/27