Keyboard Caps Lock as Ctrl

Asked by John Rose

In Gutsy, I was able to Change the keyboard Caps Lock to Ctrl. However, in Hardy there no longer seem sto be a way of doing this. I'm sure this is very simpe to solev, but I would apprecaiet an answer. Thank you.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu openoffice.org Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Allen Chemist (alchemist) said :
#1

Type the following into a terminal:

xmodmap -e "remove lock = Caps_Lock"
xmodmap -e "keycode 66 = Control_L"
xmodmap -e "add Control = Control_L"

This should make "caps lock" equivalent to your left control key. You will need to do this every re-start, but you can automate that by pasting the above 3 lines in your ~/.bashrc

HTH
-Allen

Revision history for this message
John Rose (johnaaronrose) said :
#2

Allen,

The first line gave an error:
xmodmap: commandline:1: bad keysym in remove modifier list 'Caps_Lock', no corresponding keycodes

Revision history for this message
Tony Pursell (ajpursell) said :
#3

Have you tried System > Preferences > Keyboard > Layouts > Layout Options > Ctrl Key Options > Swap Ctrl and CapsLock

Please lets us know if this works for you.

Tony

Can you help with this problem?

Provide an answer of your own, or ask John Rose for more information if necessary.

To post a message you must log in.