qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: BALATON Zoltan <balaton@eik.bme.hu>
To: Programmingkid <programmingkidx@gmail.com>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v5 4/4] adb.c: prevent NO_KEY value from going to guest
Date: Sat, 20 Aug 2016 19:18:15 +0200 (CEST)	[thread overview]
Message-ID: <alpine.BSF.2.20.1608201914480.25248@zero.eik.bme.hu> (raw)
In-Reply-To: <8D6763E3-E6EE-4131-89A4-654B600C8508@gmail.com>

On Fri, 19 Aug 2016, Programmingkid wrote:
> On Aug 18, 2016, at 7:06 AM, BALATON Zoltan wrote:
>> On Wed, 17 Aug 2016, John Arbuckle wrote:
>>> @@ -446,7 +438,10 @@ static void adb_keyboard_event(DeviceState *dev, QemuConsole *src,
>>>        return;
>>>    }
>>>    keycode = qcode_to_adb_keycode[qcode];
>>> -
>>> +    if (keycode == NO_KEY) {  /* We don't want to send this to the guest */
>>> +        ADB_DPRINTF("Ignoring NO_KEY\n");
>>> +        return;
>>> +    }
>>>    if (evt->u.key.data->down == false) { /* if key release event */
>>>        keycode = keycode | 0x80;   /* create keyboard break code */
>>>    }
>>
>> I think you should print the qcode value that was ignored instead of that it was mapped to NO_KEY which is not that informative.
>>
>> Regards,
>> BALATON Zoltan
>
> Sounds like a good idea.
>
> What do you think of this:
> ADB_DPRINTF("Ignoring key with qcode %d\n", qcode);

That looks good to me. (Nothing more is needed as this is a debug message 
so people reading this should be able to find the meaning of qcode value.)

Regards,
BALATON Zoltan

  reply	other threads:[~2016-08-20 17:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-18  2:27 [Qemu-devel] [PATCH v5 0/4] ADB improvements John Arbuckle
2016-08-18  2:27 ` [Qemu-devel] [PATCH v5 1/4] adb-keys.h: initial commit John Arbuckle
2016-08-18  2:27 ` [Qemu-devel] [PATCH v5 2/4] adb.c: add support for QKeyCode John Arbuckle
2016-08-18 11:04   ` [Qemu-devel] [Qemu-ppc] " BALATON Zoltan
2016-09-15  0:00   ` [Qemu-devel] " David Gibson
2016-08-18  2:27 ` [Qemu-devel] [PATCH v5 3/4] adb.c: correct several key assignments John Arbuckle
2016-08-18  2:27 ` [Qemu-devel] [PATCH v5 4/4] adb.c: prevent NO_KEY value from going to guest John Arbuckle
2016-08-18 11:06   ` [Qemu-devel] [Qemu-ppc] " BALATON Zoltan
2016-08-20  1:29     ` Programmingkid
2016-08-20 17:18       ` BALATON Zoltan [this message]
2016-08-18  2:37 ` [Qemu-devel] [PATCH v5 0/4] ADB improvements no-reply
2016-08-23 12:19   ` David Gibson
2016-08-23 19:21     ` Programmingkid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.BSF.2.20.1608201914480.25248@zero.eik.bme.hu \
    --to=balaton@eik.bme.hu \
    --cc=david@gibson.dropbear.id.au \
    --cc=programmingkidx@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).