LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   switch caps lock and ctrl without X? (https://www.linuxquestions.org/questions/slackware-14/switch-caps-lock-and-ctrl-without-x-281545/)

rgiggs 01-24-2005 06:06 AM

switch caps lock and ctrl without X?
 
hi,
i can switch caps lock and the left control while running X with a properly configured xorg.config. however, sometimes, i run without X, which makes those 2 keys themselves. so can i switch caps lock and left control while not running X? if so, how?
thanks.

vls 01-25-2005 09:52 AM

Re: switch caps lock and ctrl without X?
 
You need to edit a keymap in '/usr/share/kbd/keymaps/i386/qwerty'
defkeymap.map.gz is the default map loaded, I believe.

Copy it to another name:
$ cp my-keymap.map.gz
$ gunzip my-keymap.gz

Edit the file and change these two lines:
keycode 29 = Control
keycode 58 = Caps_Lock
to:
keycode 29 = Caps_Lock
keycode 58 = Control

Save the file then run:
$ loadkeys my-keymap.map

You should now be in business. Zip the file up:
$ gzip my-key.map

To set this up at boot time cd into /etc/rc.d/

Edit a file rc.keymap. Create it if it isn't there.

Add this to the file
loadkeys my-keymap.map
Save the file
NOTE: You don't have to call it my-keymap.gz; loadkeys knows to unzip the files.

$ chmod +x rc.keymap

and it will load at boot time.

rgiggs 01-26-2005 01:31 AM

sweeeeet!!! thanks a bunch.


All times are GMT -5. The time now is 02:17 PM.