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 <s...@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