Received: from eggs.gnu.org ([2001:4830:134:3::10]:39477) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1baL9F-0001q5-2B for qemu-devel@nongnu.org; Thu, 18 Aug 2016 07:06:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1baL9A-0001fW-TH for qemu-devel@nongnu.org; Thu, 18 Aug 2016 07:06:07 -0400 Date: Thu, 18 Aug 2016 13:06:04 +0200 (CEST) From: BALATON Zoltan In-Reply-To: <1471487270-1490-5-git-send-email-programmingkidx@gmail.com> Message-ID: References: <1471487270-1490-1-git-send-email-programmingkidx@gmail.com> <1471487270-1490-5-git-send-email-programmingkidx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v5 4/4] adb.c: prevent NO_KEY value from going to guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Arbuckle Cc: qemu-ppc@nongnu.org, david@gibson.dropbear.id.au, qemu-devel@nongnu.org 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