From owner-freebsd-questions@FreeBSD.ORG Wed Mar 25 16:01:42 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B36DBBF for ; Wed, 25 Mar 2015 16:01:42 +0000 (UTC) Received: from sender1.zohomail.com (sender1.zohomail.com [74.201.84.155]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36C20BB2 for ; Wed, 25 Mar 2015 16:01:41 +0000 (UTC) Received: from WorkBox.Home (67-4-199-120.mpls.qwest.net [67.4.199.120]) by mx.zohomail.com with SMTPS id 142729929385018.864088000033234; Wed, 25 Mar 2015 09:01:33 -0700 (PDT) Date: Wed, 25 Mar 2015 11:01:31 -0500 From: Bigby James To: freebsd-questions@freebsd.org Subject: Re: tried everything (Swap Caps_Lock and Control_L) nothing works! Message-ID: <20150325160131.GA8983@WorkBox.Home> References: <20150325125708.GH3131@itcom245.staff.itd.umich.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150325125708.GH3131@itcom245.staff.itd.umich.edu> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 16:01:42 -0000 On 03/25, William Bulley wrote: > This is really annoying. I know I have used xmodmap(1) in the past > and it served me well. I now have a Dell keyboard on a Dell system > and I can't get the caps lock key swapped with the left control key. > > Here is what I have now (yes, both -- belt and suspenders...): > > unix% head -6 $HOME/.xmodmaprc > remove Lock = Caps_Lock > remove Control = Control_L > keysym Control_L = Caps_Lock > keysym Caps_Lock = Control_L > add Lock = Caps_Lock > add Control = Control_L > unix% grep modmap .xinitrc > /usr/local/bin/xmodmap $HOME/.xmodmaprc > unix% grep swap /etc/X11/xorg.conf > Option "XkbOptions" "ctrl:swapcaps" > unix% pkg info | grep xorg-server > xorg-server-1.14.7_2,1 X.Org X server and related programs You can easily do this without using xmodmap. Create the file '/usr/local/etc/X11/xorg.conf.d/10-keyboard.conf' and add the following to it: > Section "InputClass" > Identifier "system-keyboard" > Option "XkbOptions" "ctrl:swapcaps" > EndSection Bingo, bango, done. You can also follow Marko Turk's suggestion, but I think the above method is cleaner myself. -- "A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools." - Douglas Adams