From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Paul O'Donnell Newsgroups: gmane.emacs.help Subject: Re: xmodmap Date: Wed, 22 Jan 2003 11:52:27 GMT Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3E2E85FA.6050701@rogers.com> References: <3E2DEBA5.2070408@rogers.com> <84n0lttwrd.fsf@lucy.is.informatik.uni-duisburg.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1043237398 30536 80.91.224.249 (22 Jan 2003 12:09:58 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 22 Jan 2003 12:09:58 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18bJhc-0007wL-00 for ; Wed, 22 Jan 2003 13:09:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18bJTj-0003sP-00 for gnu-help-gnu-emacs@m.gmane.org; Wed, 22 Jan 2003 06:55:35 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!cyclone.bc.net!sjc70.webusenet.com!news.webusenet.com!news03.bloor.is.net.cable.rogers.com!news02.bloor.is.net.cable.rogers.com.POSTED!not-for-mail User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help Original-Lines: 83 Original-NNTP-Posting-Host: 24.102.194.139 Original-X-Complaints-To: abuse@rogers.com Original-X-Trace: news02.bloor.is.net.cable.rogers.com 1043236347 24.102.194.139 (Wed, 22 Jan 2003 06:52:27 EST) Original-NNTP-Posting-Date: Wed, 22 Jan 2003 06:52:27 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:109339 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:5862 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:5862 Kai Großjohann wrote: > Paul O'Donnell writes: > > >>I am trying to use the xmodmap untility to reconfigure my keyboard, >>but I am not having success. As it is >> >>keycode 115 = Super_L >>keycode 117 = Menu >> >>I want to changes these to be Alt_L and Alt_R respectively. So I did >>the following at the command prompt. >> >>[paul@cpe024350002546 paul]$ xmodmap -e "keycode 115 = Alt_L" >> >>[paul@cpe024350002546 paul]$ xmodmap -e "keycode 117 = Alt_R" > > > Before these two commands, you should do "xmodmap -pm" and look for > the keysyms Super_L and Menu. Do xmodmap -e "clear mod3" if one of > them is on mod3, and similar for other modifiers. Then do the > keycode assignments. Then do xmodmap -e "add mod3 = sym1 sym2" to > add the previous keysyms back to the modifier (except for Super_L and > Menu, of course). Thanks Kai, It works! However I am curious about what I actually did. I followed your instructions, modifying it to match my system. My goal was to disable the Alt keys and make the Left Window Key an Alt Key and make the Right Menu key an Alt Key. What actually happened was the Alt Keys remained as Alt Keys and the Window and Menu keys became Alt Keys as well. I am happy with that, in fact I prefer it. With my Alt Keys still intact it will still work for someone else who needs to use my keyboard. I would like to know why my changes did not do what I intended though and I am curious about the out put of the xmodmap -mp command. I accomplished the change by creating a .xmodmaprc file which I invoke in my .bash_profile file. (Perhaps I should invoke it elswehere like in the .bashrc file, but my understanding of how these files actually work is shaky and at least I got it to work.Changes to my .bash_profile file are permanent because I always use a login shell.) Below are the contents of my .xmodmaprc file and the output of $xmonmap -pm [paul: /home/paul]$ xmodmap -pm xmodmap: up to 4 keys per modifier, (keycodes in parentheses): shift Shift_L (0x32), Shift_R (0x3e) lock Caps_Lock (0x42) control Control_L (0x25), Control_R (0x6d) mod1 mod2 Num_Lock (0x4d) mod3 mod4 Alt_L (0x40), Alt_L (0x73), Alt_R (0x71), Alt_R (0x75) mod5 Scroll_Lock (0x4e) [paul: /home/paul]$ I am curious about the mod4 line. Why are there 4 entries there? And the rc file that accomplished the changes. [paul: /home/paul]$ cat .xmodmaprc clear mod1 clear mod4 keycode 115 = Alt_L keycode 117 = Alt_R add mod4 = Alt_L Alt_R [paul: /home/paul]$ Any hints to help me understand this are appreciated. The man pages for xmodman are not really clear to me and the online sources I have found on xmodmap are very brief. It would be nice to find some better docs on this subject. Thanks, Paul