From patchwork Fri Apr 2 16:02:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Drung X-Patchwork-Id: 49317 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 19771B7CF7 for ; Sat, 3 Apr 2010 04:33:47 +1100 (EST) Received: from localhost ([127.0.0.1]:42098 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxkkZ-0001cC-6i for incoming@patchwork.ozlabs.org; Fri, 02 Apr 2010 13:33:43 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NxjJx-0002Tw-Bp for qemu-devel@nongnu.org; Fri, 02 Apr 2010 12:02:09 -0400 Received: from [140.186.70.92] (port=43998 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NxjJv-0002Tb-5q for qemu-devel@nongnu.org; Fri, 02 Apr 2010 12:02:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NxjJt-0003PY-MS for qemu-devel@nongnu.org; Fri, 02 Apr 2010 12:02:06 -0400 Received: from mail-bw0-f224.google.com ([209.85.218.224]:39791) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NxjJt-0003PO-Gh for qemu-devel@nongnu.org; Fri, 02 Apr 2010 12:02:05 -0400 Received: by bwz24 with SMTP id 24so1930902bwz.17 for ; Fri, 02 Apr 2010 09:02:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:from:to :content-type:date:message-id:mime-version:x-mailer; bh=Ey95lPJ5gy9KsR1t0UoWHZsaNedufxt7z5xPrtoq+u4=; b=W1jeVlHRAgYS+ehXhhQShWOwTcHE2ugEbHDclNn5x0AV/h9iV6u1sZBy2I1GTtswlf 887qSci8WM657iMsOSTXRuy0L/5tFB6//8iPYJjqvmSkuv95gIyoJtRwWe3G1dh9PqEd 9b1cULB89acYSsWdT+mQ7KUkYV8QkmxworUWI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:from:to:content-type:date:message-id:mime-version :x-mailer; b=QT4PtQFlt66LitSP+UJpJTVi0Cyn+zYe/x2N4xcJGwNK3zgt8hSpIU/RXUiUC2b2Bl 2xdDFmZ4ghbt91a41ArKgGy2jqxOSCP7rCibw9xsCnEKymXdP2Ob0Fxq23nHzCFn1aOS k8YqRTB+FupOXENuBgrWAFjSE3tL/APDHpZOo= Received: by 10.204.24.9 with SMTP id t9mr3249272bkb.150.1270224123799; Fri, 02 Apr 2010 09:02:03 -0700 (PDT) Received: from [192.168.3.10] (p4FE233F2.dip.t-dialin.net [79.226.51.242]) by mx.google.com with ESMTPS id 14sm4600607bwz.6.2010.04.02.09.02.02 (version=SSLv3 cipher=RC4-MD5); Fri, 02 Apr 2010 09:02:03 -0700 (PDT) From: Benjamin Drung To: qemu-devel@nongnu.org Date: Fri, 02 Apr 2010 18:02:01 +0200 Message-ID: <1270224121.12075.6.camel@deep-thought> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Fri, 02 Apr 2010 13:31:38 -0400 Subject: [Qemu-devel] wrong behaviour of caps lock 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 Hi, We applied the attached patch in Ubuntu to fix the wrong behavior of caps lock. Initial bug report: https://launchpad.net/bugs/427612 Testcase: Select German NEO 2 as keyboard layout and press "caps lock" + "l". Then a "-" should appear instead of a "t". From bb212d2b23bee1abe52db53231caccc1a6a27791 Mon Sep 17 00:00:00 2001 From: Shahar Havivi Date: Fri, 12 Feb 2010 00:00:44 +0200 Subject: [PATCH] Qemu does not pass pressed capslock to client --- sdl.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sdl.c b/sdl.c index cf27ad2..9074641 100644 --- a/sdl.c +++ b/sdl.c @@ -390,9 +390,11 @@ 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; } -- 1.6.3.3