From owner-freebsd-x11@FreeBSD.ORG Thu Jun 19 17:39:49 2008 Return-Path: Delivered-To: freebsd-x11@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C0C6106564A for ; Thu, 19 Jun 2008 17:39:49 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from hosted.kievnet.com (hosted.kievnet.com [193.138.144.10]) by mx1.freebsd.org (Postfix) with ESMTP id EC4018FC17 for ; Thu, 19 Jun 2008 17:39:48 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost ([127.0.0.1] helo=edge.pp.kiev.ua) by hosted.kievnet.com with esmtpa (Exim 4.62) (envelope-from ) id 1K9O6s-000ND0-37; Thu, 19 Jun 2008 20:39:46 +0300 Message-ID: <485A99E1.6080604@icyb.net.ua> Date: Thu, 19 Jun 2008 20:39:45 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.14 (X11/20080517) MIME-Version: 1.0 To: Kevin Oberman References: <20080619155823.5F37E4500E@ptavv.es.net> In-Reply-To: <20080619155823.5F37E4500E@ptavv.es.net> Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-x11@freebsd.org Subject: Re: capslock led after upgrade to xorg-server-1.4.2,1 X-BeenThere: freebsd-x11@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: X11 on FreeBSD -- maintaining and support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2008 17:39:49 -0000 on 19/06/2008 18:58 Kevin Oberman said the following: >> Date: Thu, 19 Jun 2008 15:37:18 +0200 >> From: "Paul B. Mahol" >> Sender: owner-freebsd-x11@freebsd.org >> >> It is upstream issue/regression. I liked how it was before ... but >> Xorg devs have different opinion. > > Hmm. They have the opinion that busted is good? > > This has been annoying for a while. I swap CapsLock with LeftCtrl. I > have done this ever since Microsoft decided to "hide" it down below the > shift key. It has always worked fine, but it "broke" with xorg 7.2 > (or maybe 7.3). Now, to get ALT+CTRL to work, I need to press ALT first > and then CTRL, which is not my natural tendancy. It's very annoying. > > I have confirmed with xev that all of the press/release events are > proper, so it's something in the processing of the events that is > foobar. I think that this is a result of how XKB works. After you swapped CAPS and LCTL the latter stopped being a modifier key, so when it is pressed "CTRL" modifier flag is not set and there is no magic about CTRL+ALT. On the other hand ALT is still a modifier key, so ALT+CTRL can still be magic. I think that you can still make CTRL+ALT work through some configuration hackery for ALT key. And pressing CAPS+ALT should work right now (because CAPS now sets the modifier flag). What can not be changed, and you are completely correct here, is that a key a press has an effect on XKB state as soon as it is pressed. Only previous key presses can affect current key press, but current key press can not wait for future key presses. So for XKB ALT+CTRL and CTRL+ALT are always different sequences, but "normally" they can be made to have the same effect. E.g. see /usr/local/share/X11/xkb/symbols/group: partial modifier_keys xkb_symbols "ctrl_alt_toggle" { virtual_modifiers Alt; key { type[Group1]="PC_CONTROL_LEVEL2", symbols[Group1]= [ NoSymbol, ISO_Prev_Group ], virtualMods= Alt }; key { type[Group1]="PC_CONTROL_LEVEL2", symbols[Group1]= [ NoSymbol, ISO_Next_Group ], virtualMods= Alt }; key { type[Group1]="PC_ALT_LEVEL2", symbols[Group1]= [ Control_L, ISO_Prev_Group ] }; key { type[Group1]="PC_ALT_LEVEL2", symbols[Group1]= [ Control_R, ISO_Next_Group ] }; }; First two "key" clauses define what happens when ALTs are pressed while CTRL modifier is in effect, two others define the opposite situation. In any case, this does not seem to be related to my original report. -- Andriy Gapon