From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: Why does virtmanager (VNC) console get stuck in caps lock mode? Date: Fri, 30 Jul 2010 14:35:22 -0700 Message-ID: <20100730143522.5167832b@nehalam> References: <20100730133916.769756ae@nehalam> <4C534016.6040706@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from mail.vyatta.com ([76.74.103.46]:46482 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752342Ab0G3VfZ (ORCPT ); Fri, 30 Jul 2010 17:35:25 -0400 In-Reply-To: <4C534016.6040706@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 30 Jul 2010 16:11:50 -0500 Anthony Liguori wrote: > On 07/30/2010 03:39 PM, Stephen Hemminger wrote: > > As an emacs user, I remap caps-lock to CTRL key in normal usage. > > But often in KVM console VNC window, it gets stuck in caps lock mode. > > > > Try passing no-lock-key-sync to the -vnc option. If you're using > virt-manger, that may be challenging without hacking libvirt. > > But you could also try using qemu directly and then using gvncviewer. And I could go back to telnet as well... > > This appears to be a new mis-feature, since it never used to get stuck > > before (not sure whether is kernel, virt-manager or QEMU). > > > > Any clues? > > > > There's a few possibilities. The first is that you don't have the > guest's keymap setup to treat caps lock as ctrl. I imagine you do though. Already done (via Gnome preferences) > The second, more likely, possibility is that our caps lock detection > heuristics are being defeated because you're remapping the key. > > The above option disables our heuristics. If that "fixes" the problem > then we probably need to add some bits to further handle it. The real > source of the problem is that we can receive key down events but if > focus moves we won't receive the key up. That can create subtle > problems where you're pressing control and release it after switching > windows. The effect is the guest sees control as being stuck. > > We do our best to work out this situation but it's not necessarily perfect. > > Regards, > > Anthony Liguori Ideally you could read keymap and respond accordingly, but that maybe too hard. --