[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] adb.c: add support for QKeyCode
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] adb.c: add support for QKeyCode |
Date: |
Thu, 24 Mar 2016 10:34:08 +0000 |
On 24 March 2016 at 01:16, Programmingkid <address@hidden> wrote:
> The old pc scancode translation is replaced with QEMU's QKeyCode.
>
> Signed-off-by: John Arbuckle <address@hidden>
> ---
> hw/input/adb.c | 222
> +++++++++++++++++++++++++++++++++++++++++++++------------
> 1 file changed, 176 insertions(+), 46 deletions(-)
>
> diff --git a/hw/input/adb.c b/hw/input/adb.c
> index f0ad0d4..3bfa686 100644
> --- a/hw/input/adb.c
> +++ b/hw/input/adb.c
> @@ -25,6 +25,9 @@
> #include "hw/hw.h"
> #include "hw/input/adb.h"
> #include "ui/console.h"
> +#include "include/hw/input/adb-keys.h"
> +#include "ui/input.h"
> +#include "sysemu/sysemu.h"
>
> /* debug ADB */
> //#define DEBUG_ADB
> @@ -187,23 +190,138 @@ typedef struct ADBKeyboardClass {
> DeviceRealize parent_realize;
> } ADBKeyboardClass;
>
> -static const uint8_t pc_to_adb_keycode[256] = {
> - 0, 53, 18, 19, 20, 21, 23, 22, 26, 28, 25, 29, 27, 24, 51, 48,
> - 12, 13, 14, 15, 17, 16, 32, 34, 31, 35, 33, 30, 36, 54, 0, 1,
> - 2, 3, 5, 4, 38, 40, 37, 41, 39, 50, 56, 42, 6, 7, 8, 9,
> - 11, 45, 46, 43, 47, 44,123, 67, 58, 49, 57,122,120, 99,118, 96,
> - 97, 98,100,101,109, 71,107, 89, 91, 92, 78, 86, 87, 88, 69, 83,
> - 84, 85, 82, 65, 0, 0, 10,103,111, 0, 0,110, 81, 0, 0, 0,
> - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> - 0, 0, 0, 94, 0, 93, 0, 0, 0, 0, 0, 0,104,102, 0, 0,
> - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76,125, 0, 0,
> - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,105, 0, 0, 0, 0, 0,
> - 0, 0, 0, 0, 0, 75, 0, 0,124, 0, 0, 0, 0, 0, 0, 0,
> - 0, 0, 0, 0, 0, 0, 0,115, 62,116, 0, 59, 0, 60, 0,119,
> - 61,121,114,117, 0, 0, 0, 0, 0, 0, 0, 55,126, 0,127, 0,
> - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> - 0, 0, 0, 0, 0, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
> +int qcode_to_adb_keycode[] = {
> +
> + [Q_KEY_CODE_SHIFT] = ADB_KEY_LEFT_SHIFT,
> + [Q_KEY_CODE_SHIFT_R] = ADB_KEY_RIGHT_SHIFT,
This won't compile, because at this point in the series the
adb-keys.h file doesn't exist. Patch series must build and
work at every point in the series, not just at the end.
thanks
-- PMM