Received: from eggs.gnu.org ([2001:4830:134:3::10]:44143) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZKVh-0000a5-SY for qemu-devel@nongnu.org; Wed, 01 Oct 2014 10:04:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZKVa-0001u7-Sr for qemu-devel@nongnu.org; Wed, 01 Oct 2014 10:04:05 -0400 Received: from ssl.serverraum.org ([88.198.40.39]:47733) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZKVa-0001tl-MD for qemu-devel@nongnu.org; Wed, 01 Oct 2014 10:03:58 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 01 Oct 2014 16:03:55 +0200 From: Michael Walle Message-ID: <5fe7942cff2635b30003e323627bd902@walle.cc> Subject: [Qemu-devel] hid keyboard event handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Hi Gerd, i have another issue. This time with the hid keyboard rework (commit 1ff5eedd). Before this commit, a press of, for example the windows key, resulted in two calls of the hs->event() callback. Eg. there were two events queued and two callbacks. But after your commit, two events are queued (see for loop in hid_keyboard_event()) but there is now only one callback. My input device model (milkymist-softusb.c) polls (hid_keyboard_poll()) exactly once per event callback. Actually, i don't see any other way to do it because the hid_keyboard_poll() always succeeds even if there is no event in the queue. So at the moment, if you press the windows key, the event queue fills by two but only one entry is fetched from the device model and eventually the queue is full. -michael