Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Since I rarely use caps-lock, I'd like to map the key to a middle mouse click instead. I would also like to map Alt+Caps Lock to the original function of the caps lock key, should I ever need it.

I can map any keyboard shortcut to xdotool click 2, but the Gnome Keyboard Shortcuts dialog won't let me assign a command to the caps-lock key, even with modifiers.

I know this is a bit of a strange undertaking; How would I go about doing it?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

If you first remove the lock modifier from the Caps Lock key you should then be able to assign the key in Keyboard Shortcuts, use the command below to do that:

echo  'remove lock = Caps_Lock' | xmodmap -
share|improve this answer
    
very good! any chance to get caps lock back onto alt+capslock? –  Stefano Palazzo Dec 18 '10 at 16:36
add comment

Another easy solution if you prefer to use a GUI is to download easystrokesInstall easystrokes app from the Ubuntu software center. You can easily map keyboard keys and shortcuts to mouse buttons as well as mouse gestures.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.