From owner-freebsd-questions Thu Aug 17 0:15:52 2000 Delivered-To: freebsd-questions@freebsd.org Received: from manatee.mammalia.org (manatee.mammalia.org [216.231.50.6]) by hub.freebsd.org (Postfix) with ESMTP id 46B6437B59F for ; Thu, 17 Aug 2000 00:15:49 -0700 (PDT) (envelope-from rjoseph@mammalia.org) Received: by manatee.mammalia.org (Postfix, from userid 1000) id E21F311CF07; Thu, 17 Aug 2000 00:15:46 -0700 (PDT) Date: Thu, 17 Aug 2000 00:15:46 -0700 From: R Joseph Wright To: freebsd-questions Subject: Re: editors question #2 Message-ID: <20000817001546.A248@mammalia.org> References: <20000126095411.B43103@freebie.lemis.com> <20000815142645.A37927@dogma.freebsd-uk.eu.org> <20000816200136.C254@parish> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <20000816200136.C254@parish>; from marko@freebsd.org on Wed, Aug 16, 2000 at 08:01:36PM +0100 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG And Mark Ovens spoke: > On Tue, Aug 15, 2000 at 02:26:45PM +0100, j mckitrick wrote: > > On Wed, Jan 26, 2000 at 09:54:11AM +1030, Greg Lehey wrote: > > | The difference with Emacs is that you don't just use the shift key, > > | you also use the control and meta keys. This may take a little > > | getting used to (especially if you're using the standard broken > > | keyboard layout that replaces control with CapsLock), but if you have > > > > Where are ctrl and caps-lock *supposed* to be? > > > > Where do you want them to be? :) The traditional Unix locations are > the opposite to a std PC keyboard, i.e. Ctrl next to 'A' and CapsLock > below the LeftShift key. I recently switched my escape and caps lock keys so I could be more productive in vi. The console keymap is different from the X keymap, so I had to do it in two parts: 1) For the console, I copied the file /usr/share/syscons/keymaps/us.emacs.kbd to /usr/share/syscons/keymaps/us.joseph.kbd and just switched the two keys around (how to do that is pretty self explanatory if you venture a look at the file). You might wonder why I used the "emacs" keymap. Well, it doesn't conflict with vi and makes using emacs easier for the rare times that I go there :). The final step was to put in /etc/rc.conf the line keymap=us.joseph.kbd 2) For X, it involves xmodmap. I created a file .xmodmaprc in my home directory with the following lines: clear lock keycode 66 = Escape keycode 9 = Caps_Lock add Lock = Caps_Lock Read the man page for xmodmap to see how to view the current keymap and how to change it. It's a bit less straightforward than the console keymap procedure. Finally, I put the following line in .xinitrc: xmodmap $HOME/.xmodmaprc & I found it important to put the full path to .xmodmaprc in the file, because if you don't and you start X from a directory other than $HOME, xmodmap won't find it. I don't know if I exactly answered the question, but that's how I changed my keymaps :). Joseph To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message