From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K3t0L-00040k-Cq for qemu-devel@nongnu.org; Wed, 04 Jun 2008 09:26:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K3t0J-0003z8-La for qemu-devel@nongnu.org; Wed, 04 Jun 2008 09:26:16 -0400 Received: from [199.232.76.173] (port=51753 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K3t0J-0003yu-CU for qemu-devel@nongnu.org; Wed, 04 Jun 2008 09:26:15 -0400 Received: from wr-out-0506.google.com ([64.233.184.230]:60195) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K3t0J-0003wj-6o for qemu-devel@nongnu.org; Wed, 04 Jun 2008 09:26:15 -0400 Received: by wr-out-0506.google.com with SMTP id c49so27242wra.19 for ; Wed, 04 Jun 2008 06:26:13 -0700 (PDT) Date: Wed, 4 Jun 2008 15:25:56 +0200 From: Bernhard Fischer Subject: Re: [Qemu-devel] [PATCH 2/2] Enhance sendkey with key hold time Message-ID: <20080604132556.GA28895@mx.loc> References: <48357281.1090501@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Wed, Jun 04, 2008 at 12:16:48PM +0200, andrzej zaborowski wrote: >On 22/05/2008, Jan Kiszka wrote: >> +static void release_keys(void *opaque) >> +{ >> + int keycode; >> + >> + while (nb_pending_keycodes > 0) { Perhaps just doing a post decrement on the nb_pending would be cleaner. >> + keycode = keycodes[nb_pending_keycodes-1]; >> + if (keycode & 0x80) >> + kbd_put_keycode(0xe0); >> + kbd_put_keycode(keycode | 0x80); >> + nb_pending_keycodes--; >> + }