diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-12-22 20:42:05 +0100 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2014-02-21 00:34:40 -0600 |
commit | 88d08de7e5d08bfa44613e492cd64f8b3974d62e (patch) | |
tree | d7c5ddeb7bfc2183ca59086df813e310bf74b798 /hw/arm/mainstone.c | |
parent | 109b2439f01247b5c8a5313c367ec6b11cb46259 (diff) |
mainstone: Fix duplicate array values for key 'space'
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 <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit 7dbc1158bc63fdbad849d21409eeeb53f5230445)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'hw/arm/mainstone.c')
-rw-r--r-- | hw/arm/mainstone.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c index 9402c841e9..ffbf4bd540 100644 --- a/hw/arm/mainstone.c +++ b/hw/arm/mainstone.c @@ -75,9 +75,18 @@ static 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 */ |