|
From: | Paul O'Donnell |
Subject: | Re: xmodmap |
Date: | Wed, 22 Jan 2003 11:52:27 GMT |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 |
Kai Großjohann wrote:
Paul O'Donnell <odonnellp@rogers.com> 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
[Prev in Thread] | Current Thread | [Next in Thread] |