From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Default Emacs keybindings Date: Tue, 4 May 2004 07:42:03 +0000 (GMT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1083656511 17946 80.91.224.253 (4 May 2004 07:41:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 4 May 2004 07:41:51 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 04 09:41:40 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BKuYe-0001qb-00 for ; Tue, 04 May 2004 09:41:40 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BKuYe-0001fT-00 for ; Tue, 04 May 2004 09:41:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BKuXr-00040f-LH for emacs-devel@quimby.gnus.org; Tue, 04 May 2004 03:40:51 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BKuXk-0003zt-US for emacs-devel@gnu.org; Tue, 04 May 2004 03:40:44 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BKuXD-0003ik-U3 for emacs-devel@gnu.org; Tue, 04 May 2004 03:40:43 -0400 Original-Received: from [193.149.49.134] (helo=acm.acm) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BKuXC-0003hK-Nq for emacs-devel@gnu.org; Tue, 04 May 2004 03:40:11 -0400 Original-Received: from localhost (root@localhost) by acm.acm (8.8.8/8.8.8) with SMTP id HAA00885 for ; Tue, 4 May 2004 07:42:03 GMT X-Sender: root@acm.acm Original-To: emacs-devel@gnu.org In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22686 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22686 On 4 May 2004, Eli Zaretskii wrote: >> Date: Mon, 3 May 2004 17:59:47 -0500 (CDT) >> From: Luc Teirlinck >> Richard Stallman wrote: >> What we should do is include prominent documentation telling users >> how to remap their caps-lock key, with specific recipes. (I have >> no idea where to find this information for GNU/Linux.) The relevant man pages are loadkeys(1), dumpkeys(1), showkey(1) and keytables(5) >> >From M-x man xmodmap: >xmodmap is only for working on X, IIRC it doesn't help if one runs Emacs >from a console or logs in remotely via a terminal emulator. So this is >not a universal solution, not even on a GNU/Linux machine. The Right Way to do this is to modify the Linux keyboard driver. For Linux running on an Intel PC, create a two-line file called (say) /etc/keytab.CoLo with the following contents: keycode 29 = Caps_Lock keycode 58 = Control Then, at a bash prompt (or, eventually, in a start-up script), do: # loadkeys /etc/keytab.CoLo [The scan codes of the pertinent keys on different hardware can be found with showkeys, for example.] There is a bug in the keyboard driver of my (shamefully out of date) Linux kernel, in which after running this file, the keyboard is left in "permanent control" state. This can be worked around by specifying in /etc/keytab.CoLo "Caps_Lock" or "Control" individually for each modifier combination, as follows. keycode 29 = Caps_Lock Caps_Lock Caps_Lock Caps_Lock Caps_Lock Caps_Lock Caps_Lock Caps_Lock Caps_Lock Caps_Lock Caps_Lock keycode 58 = Control Control Control Control Control Control Control Control Control Control Control The number of "Caps_Lock"s necessary can be found from "dumpkeys -i". -- Alan Mackenzie (Munich, Germany)