How can I emulate a mouse click on a keyboard on linux, e.g. by defining that my right CTRL-key should behave as if I clicked the right mouse button?

link|improve this question
feedback

1 Answer

up vote 4 down vote accepted

There is a "use numeric keypad as mouse" option for both kde and gnome. In kde 4.4 it's located under system settings -> Mouse -> Mouse navigation. I think that it's under accessability settings in gnome. The click actions appears on the keys around the numpad - the "+" key is right click and the "5" key is left click in kde.

If you don't run kde/gnome or want to use a more configurable solution, some sort of combination of these two programs should work:

http://www.semicomplete.com/blog/geekery/xdo.html

http://www.nongnu.org/xbindkeys/xbindkeys.html

Use xbindkeys to bind a keypress to

   echo "click 3" | xdo

in order to get a right click.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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