From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: gebser@speakeasy.net Newsgroups: gmane.emacs.help Subject: Re: Using the `Win' key as `Ctrl' in Emacs? Date: Thu, 1 Jul 2004 05:12:49 -0400 (EDT) Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <20040616222510.230014f5.tootiny@163.com> <20040618004337.07e5e13a.tootiny@163.com> <20040618162341.45ebb4f1.tootiny@163.com> Reply-To: gebser@speakeasy.net NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1088673302 9329 80.91.224.253 (1 Jul 2004 09:15:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 1 Jul 2004 09:15:02 +0000 (UTC) Cc: GNU Emacs List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 01 11:14:56 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bfxeh-0001Ap-00 for ; Thu, 01 Jul 2004 11:14:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BfxgS-00047x-Da for geh-help-gnu-emacs@m.gmane.org; Thu, 01 Jul 2004 05:16:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BfxgG-00044H-5M for help-gnu-emacs@gnu.org; Thu, 01 Jul 2004 05:16:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BfxgD-00042F-PH for help-gnu-emacs@gnu.org; Thu, 01 Jul 2004 05:16:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BfxgD-00041m-MQ for help-gnu-emacs@gnu.org; Thu, 01 Jul 2004 05:16:29 -0400 Original-Received: from [216.254.0.204] (helo=mail4.speakeasy.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Bfxdn-0002ci-CM for help-gnu-emacs@gnu.org; Thu, 01 Jul 2004 05:13:59 -0400 Original-Received: (qmail 9055 invoked from network); 1 Jul 2004 09:13:58 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO heidegger.mousecar.net) ([66.93.11.17]) (envelope-sender ) by mail4.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 1 Jul 2004 09:13:58 -0000 Original-Newsgroups: gnu.emacs.help In-Reply-To: <20040618162341.45ebb4f1.tootiny@163.com> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19398 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19398 At 16:23 (UTC+0800) on Fri, 18 Jun 2004 Xiaoyong Jin said: = On 18 Jun 2004 01:05:27 -0700 = rob@tenfoot.org.uk (Rob Walker) wrote: = = > > .... = = Yes, I've used xmodmap. I tried this: = = xmodmap -e "add control = Super_R" = >>From "man xmodmap": One of the more irritating differences between keyboards is the location of the Control and Shift Lock keys. A common use of xmodmap is to swap these two keys as follows: ! ! Swap Caps_Lock and Control_L ! 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 Put the above code into ~/.Xmodmap and it should be read and executed when you log into an X session (by /etc/X11/xinit/xinitrc). This is a good thing to do when you have an account on someone else's UNIX system. For my own machines (e.g., at home) I simply copy /lib/kbd/keymaps/i386/qwerty/us.map.gz to /lib/kbd/keymaps/i386/qwerty/ctrlcaps.gz, then edit the latter to get the same effect as the ~/.Xmodmap code (above). This requires changing only two of its lines to these: keycode 29 = Caps_Lock keycode 58 = Control (Make sure that these lines don't end with a space character; for some reason that screws things up.) To have ctrlcaps loaded into X (e.g., at bootup), make the appropriate change in whatever your Linux flavor points to in its /etc/*/init.d/key* startup script. On RedHat and similars, edit /etc/sysconfig/keyboard to read: KEYTABLE="ctrlcaps" Pretty much these same steps have worked on a variety of Linux boxes as well as HPs, Suns, and other Unices. hth, ken