From patchwork Thu Feb 11 21:13:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shahar Havivi X-Patchwork-Id: 45159 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 47B0BB7D09 for ; Fri, 12 Feb 2010 08:19:47 +1100 (EST) Received: from localhost ([127.0.0.1]:49131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfgNk-0002GR-9T for incoming@patchwork.ozlabs.org; Thu, 11 Feb 2010 16:15:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfgMM-0002GM-Lg for qemu-devel@nongnu.org; Thu, 11 Feb 2010 16:14:02 -0500 Received: from [199.232.76.173] (port=48982 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfgML-0002GE-Vq for qemu-devel@nongnu.org; Thu, 11 Feb 2010 16:14:02 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfgML-0007hj-9W for qemu-devel@nongnu.org; Thu, 11 Feb 2010 16:14:01 -0500 Received: from mail-fx0-f222.google.com ([209.85.220.222]:57845) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfgML-0007hf-1O for qemu-devel@nongnu.org; Thu, 11 Feb 2010 16:14:01 -0500 Received: by fxm22 with SMTP id 22so1785332fxm.16 for ; Thu, 11 Feb 2010 13:13:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:from:date:message-id :subject:to:cc:content-type; bh=EiWjcgpZSsFcvBqvfJgp6e5y87VkV1qsHbPLNSmuTm4=; b=LlF+u2Bd+JCDok6y43X1lFcnUy0ORDohpt/d364ByKvslP2ht8TlzZOmHGSd6iaKKZ y7XNYwOWcgEdxtAc3LYGz66JR9t3+iW4NX6wTFgZrbd+5VqcGlgtSH00l8PWsq7TZH7t 2+2HRVwioj07mzIKBht1mz1OMtuEqvXGFagtU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:cc:content-type; b=gsEJp2OR5H5D53SuFlBq1Z1Leh4MI3f0pENjCXM7sPlDAYK+lrKPqY94hwjrb6YrYa jubYQug3Sni88vdZ7oMX6ltjXn3JEPnq7E5JhIA80/1VIYhnxrRF2y5VyraODVQAABhE L1HmUaIG/bkAWcR4jHavdofkoeFg6hfzI43uY= MIME-Version: 1.0 Received: by 10.103.48.13 with SMTP id a13mr353046muk.14.1265922839160; Thu, 11 Feb 2010 13:13:59 -0800 (PST) From: Shahar Havivi Date: Thu, 11 Feb 2010 23:13:39 +0200 Message-ID: To: qemu-devel@nongnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: bdrung@ubuntu.com Subject: [Qemu-devel] Qemu does not pass pressed caps lock to client X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Qemu have a hack for capslock that is not working with Ubuntu. attached patch that fix it, as describe in this bug: https://bugs.launchpad.net/qemu/+bug/427612 Signed-off-by: Shahar Havivi --- sdl.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sdl.c b/sdl.c index cf27ad2..b3d5049 100644 --- a/sdl.c +++ b/sdl.c @@ -390,9 +390,10 @@ static void sdl_process_key(SDL_KeyboardEvent *ev) break; case 0x45: /* num lock */ case 0x3a: /* caps lock */ - /* SDL does not send the key up event, so we generate it */ - kbd_put_keycode(keycode); - kbd_put_keycode(keycode | 0x80); + if (ev->type == SDL_KEYUP) + kbd_put_keycode(keycode | 0x80); + else + kbd_put_keycode(keycode); return; }