Received: from eggs.gnu.org ([2001:4830:134:3::10]:49341) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZKon-0002L3-6e for qemu-devel@nongnu.org; Wed, 01 Oct 2014 10:23:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZKoh-00009N-2p for qemu-devel@nongnu.org; Wed, 01 Oct 2014 10:23:49 -0400 Received: from ssl.serverraum.org ([88.198.40.39]:42741) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZKog-000097-Sw for qemu-devel@nongnu.org; Wed, 01 Oct 2014 10:23:43 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 01 Oct 2014 16:23:40 +0200 From: Michael Walle In-Reply-To: <1412173071.23471.16.camel@nilsson.home.kraxel.org> References: <5fe7942cff2635b30003e323627bd902@walle.cc> <1412173071.23471.16.camel@nilsson.home.kraxel.org> Message-ID: Subject: Re: [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 Am 2014-10-01 16:17, schrieb Gerd Hoffmann: > Hi, > >> 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. > > You can use hid_has_events() to figure whenever there are events in the > queue or not. Oh, didn't see that function. Thanks, that should do the trick. -michael