I have the same question as Map caps-lock key to middle mouse click, but I had two problems using it. First, removing the normal use of caps lock didn't work. Second, I can't use it to hold the middle mouse button. Also, easystrokes doesn't seem to exist anymore, so that answer isn't helpful.
Ubuntu – How to map a key to middle click
shortcut-keys
Best Answer
install the pre-requisites:
Then create the xbindkeys config file:
bind the key:
Now we need to figure out what the keysym of your caps lock button is. Run
Put your mouse into the box that appears and press the caps lock button. This is what I get.
The important part here is
Write the keysym (
0xffe5
) down, you'll need it later.Now edit the xbindkeys config file.
And add the following to the file:
(note, replace
0xffe5
with whatever number you got earlier. I bet it will be the same, but I'm not sure).Save and close the file. Now run:
You're done!
Caveat:
On my keyboard, this method didn't toggle the light on the caps lock key, (which is understandable), so you will probably lose any indicators you have that caps is enabled. Any software indicators should still work though.