qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [PATCH v4 3/5] adb.c: correct several key assignments


From: David Gibson
Subject: Re: [Qemu-ppc] [PATCH v4 3/5] adb.c: correct several key assignments
Date: Mon, 15 Aug 2016 22:09:11 +1000
User-agent: Mutt/1.6.2 (2016-07-01)

On Fri, Aug 12, 2016 at 08:10:01PM -0400, John Arbuckle wrote:
> The original pc_to_adb_keycode mapping did have several keys that were
> incorrectly mapped. This patch fixes these mappings.

Since the way the initial qcode mapping was constructed from the pc
code mapping isn't particularly obvious, I don't know that there's
much value in splitting this up.  Might be simpler to just fold this
into the initial introduction of the qkeycode mapping.

> Signed-off-by: John Arbuckle <address@hidden>
> Reviewed-by: Peter Maydell <address@hidden>
> ---
> v4 changes:
> Removed NO_KEY related code.
> Kept all the "= 0" code near the end of the qcode_to_adb_keycode.
> 
>  hw/input/adb.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/input/adb.c b/hw/input/adb.c
> index bbf0f44..5ca7b4a 100644
> --- a/hw/input/adb.c
> +++ b/hw/input/adb.c
> @@ -196,7 +196,7 @@ int qcode_to_adb_keycode[] = {
>      [Q_KEY_CODE_SHIFT_R]       = ADB_KEY_RIGHT_SHIFT,
>      [Q_KEY_CODE_ALT]           = ADB_KEY_LEFT_OPTION,
>      [Q_KEY_CODE_ALT_R]         = ADB_KEY_RIGHT_OPTION,
> -    [Q_KEY_CODE_ALTGR]         = 0,
> +    [Q_KEY_CODE_ALTGR]         = ADB_KEY_RIGHT_OPTION,
>      [Q_KEY_CODE_CTRL]          = ADB_KEY_LEFT_CONTROL,
>      [Q_KEY_CODE_CTRL_R]        = ADB_KEY_RIGHT_CONTROL,
>      [Q_KEY_CODE_META_L]        = ADB_KEY_COMMAND,
> @@ -269,13 +269,13 @@ int qcode_to_adb_keycode[] = {
>      [Q_KEY_CODE_F10]           = ADB_KEY_F10,
>      [Q_KEY_CODE_F11]           = ADB_KEY_F11,
>      [Q_KEY_CODE_F12]           = ADB_KEY_F12,
> -    [Q_KEY_CODE_PRINT]         = 0,
> -    [Q_KEY_CODE_SYSRQ]         = 0,
> +    [Q_KEY_CODE_PRINT]         = ADB_KEY_F13,
> +    [Q_KEY_CODE_SYSRQ]         = ADB_KEY_F13,
>      [Q_KEY_CODE_SCROLL_LOCK]   = ADB_KEY_F14,
> -    [Q_KEY_CODE_PAUSE]         = 0,
> +    [Q_KEY_CODE_PAUSE]         = ADB_KEY_F15,
>  
>      [Q_KEY_CODE_NUM_LOCK]      = ADB_KEY_KP_CLEAR,
> -    [Q_KEY_CODE_KP_EQUALS]     = 0,
> +    [Q_KEY_CODE_KP_EQUALS]     = ADB_KEY_KP_EQUAL,
>      [Q_KEY_CODE_KP_DIVIDE]     = ADB_KEY_KP_DIVIDE,
>      [Q_KEY_CODE_KP_MULTIPLY]   = ADB_KEY_KP_MULTIPLY,
>      [Q_KEY_CODE_KP_SUBTRACT]   = ADB_KEY_KP_SUBTRACT,
> @@ -298,7 +298,7 @@ int qcode_to_adb_keycode[] = {
>      [Q_KEY_CODE_LEFT]          = ADB_KEY_LEFT,
>      [Q_KEY_CODE_RIGHT]         = ADB_KEY_RIGHT,
>  
> -    [Q_KEY_CODE_HELP]          = 0,
> +    [Q_KEY_CODE_HELP]          = ADB_KEY_HELP,
>      [Q_KEY_CODE_INSERT]        = ADB_KEY_HELP,
>      [Q_KEY_CODE_DELETE]        = ADB_KEY_FORWARD_DELETE,
>      [Q_KEY_CODE_HOME]          = ADB_KEY_HOME,

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]