help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I change the keys?


From: Timothy Hobbs
Subject: Re: How can I change the keys?
Date: Fri, 11 Apr 2008 22:13:36 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

I do not know about Macs, but in both windows and X11, remapping of the 
keyboard is easy, and safe.  With windows, I suggest 
http://www.randyrants.com/2006/07/sharpkeys_211.html which, as of a few years 
ago worked like a charm(my dad's even used it on vista, though only for the 
CAPS-LOCK/SHIFT switch.  xmodmap is also possible to use, though it has some 
definite complications.  xmodmap has the advantage that in my suggested method, 
you will be able to press shift-1 and get 1, while 1 will give you ! .  Here is 
how I suggest doing this project.

1. Get a piece of paper(ya, like the white crinkly stuff you make spitballs 
with).

2. Get a pencil or pen, or prick yourself with a needle, or some other writing 
utensil.

3. Open up a terminal emulator in a window manager that's sane.

4. Type 'xev'.

5. Type '1', write down the KEYCODE(for '1' this is 10), that xev printed into 
the terminal emulator window, onto your piece of paper.  Now press shift-1, and 
write down the KEYSYM on your sheet, for shift-1 this is exclam.

REPEAT for all numbers.

6. Kill the xev window.

7. Type "cd ~/; nano .xmodmap-numbershifter RET" into the terminal emulator 
window.

8. Type "keycode KEYCODE = KEYSYM NUMBER RET" into your terminal emulator 
window.

EXAMPLE: keycode 10 = exclam 1

REPEAT for the rest of your keys.

9. Save the file in nano.

10. Type xmodmap .xmodmap-numbershifter

11. Press some numbers on both the top and the keypad, using shift on the top 
as well to test it.

12. Type "nano .xsession RET"

13. Type "xmodmap /home/NAME/.xmodmap-numbershifter RET"

14. Restart X

15. Repeat step 11

OPTIONAL

16. If the key mappings went away... You should try steps 12 and 13 on .xinitrc 
instead of .xsession...

Hope this helps.

Timothy




reply via email to

[Prev in Thread] Current Thread [Next in Thread]