Old question, new answer, copying myself from here:
I was looking for CapsLock = left click, which should be similar. After much experimentation I realized I got better results with
xdotool instead of
~/.bashrc (or whatever startup script is appropriate to your system) I added this line:
/usr/bin/xmodmap -e "keycode 66 ="
This removes the 'locking' behavior of Caps Lock and assigns that key (key 66) to nothingness. I was tinkering with putting this in other places like
.xinitrc, but they never worked. It is fairly safe in
.bashrc even though it does get re-run with every terminal session opened (depending on how your
.bashrc is set up overall).
xbindkeys I created the file ~/.xbindkeysrc with these lines:
"xdotool mousedown 1"
"xdotool mouseup 1"
release + c:66
A reboot or running
source ~/.bashrc should make the
xmodmap part work. To reload
xbindkeys, try this:
xbindkeys -f ~/.xbindkeysrc