qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] ui/cocoa.m: Replace pc/xt keyboard keycode arra


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] ui/cocoa.m: Replace pc/xt keyboard keycode array with QKeyCode
Date: Tue, 1 Mar 2016 16:16:12 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

On 03/01/2016 03:12 PM, Programmingkid wrote:
> The old pc/xt keyboard keycode array is replaced with QEMU's own QKeyCode
> layout.
> 
> Signed-off-by: John Arbuckle <address@hidden>
> 
> ---
> Maintainer note:
> Please apply these patches before testing: 
> - qapi-schema.json: Add kp_equals and power keys
> - adb.c: Replace pc_to_adb_keycode with more detailed array
> - MacKeys.h: initial commit

Since this depends on those patches, it might have been nicer to submit
it as a series with a 0/4 cover letter, rather than making us chase
separate threads.


> +
> +    [MAC_KEY_ESC] = Q_KEY_CODE_ESC,
> +    //[MAC_KEY_F1] = Q_KEY_CODE_POWER, // Just in case you need the power key
> +    [MAC_KEY_F1] = Q_KEY_CODE_F1,

The comment looks weird. Probably worth a mention in the commit message
why you need it.

>  
>  static int cocoa_keycode_to_qemu(int keycode)
>  {
> -    if (ARRAY_SIZE(keymap) <= keycode) {
> +    if (ARRAY_SIZE(macToQKeyCodeMap) <= keycode) {
>          fprintf(stderr, "(cocoa) warning unknown keycode 0x%x\n", keycode);

Pre-existing, but we should fix this to avoid fprintf.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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