From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YECfq-00073G-MP for qemu-devel@nongnu.org; Thu, 22 Jan 2015 02:59:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YECfl-0003b0-JW for qemu-devel@nongnu.org; Thu, 22 Jan 2015 02:59:30 -0500 Received: from cantor2.suse.de ([195.135.220.15]:33166 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YECfl-0003ah-C4 for qemu-devel@nongnu.org; Thu, 22 Jan 2015 02:59:25 -0500 Message-ID: <54C0ADDB.9080807@suse.de> Date: Thu, 22 Jan 2015 08:59:23 +0100 From: Dinar Valeev MIME-Version: 1.0 References: <1421880521-7664-1-git-send-email-dvaleev@suse.de> <1421911242.9213.7.camel@nilsson.home.kraxel.org> In-Reply-To: <1421911242.9213.7.camel@nilsson.home.kraxel.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw/input/hid.c Fix capslock hid code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Dinar Valeev , qemu-devel@nongnu.org On 01/22/2015 08:20 AM, Gerd Hoffmann wrote: > On Mi, 2015-01-21 at 23:48 +0100, dvaleev@suse.de wrote: >> From: Dinar Valeev >> >> When ever USB keyboard is used, e.g. '-usbdevice keyboard' pressing >> caps lock key send 0x32 hid code, which is treated as backslash. >> Instead it should be 0x39 code. This affects sending uppercase keys, >> as they typed whith caps lock active. >> >> While on x86 this can be workarounded by using ps/2 protocol. On >> Power it is crusial as we don't have anything else than USB. >> >> This is fixes guest automation tasts over vnc. > > That probably happens because your test automation vnc client sends > uppercase letters without also sending shift-down/up events. The qemu > vnc server logic which is supposed to sync up capslock state between > guest and host thinks capslock is pressed on the host then and injects > some synthetic capslock key events. > > Just say'ing FYI, that doesn't render the fix invalid, but you may have > wondered why you are not seeing this with a normal vnc client ;) Yeah, I thought about sending shift+letter. It become better, but not really. Sending shift-b would print "|B". I've seen this behaviour with a home grown perl vnc client, ruby-vnc as well as with manual vncviewer client, vnc and SDL ui. The reproducer is simple: qemu-system-x86_64 -enable-kvm -cdrom SLE-12-Server-MINI-ISO-x86_64-GM-DVD.iso -usbdevice keyboard -m 1024 Pressing caps lock produces "\". showkey says backslash is pressed. Dinar, > > Added to input queue. Thanks > > thanks, > Gerd > >