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.

My friend has a Dell Netbook with a twitchy touchpad and doesn't really right click reliably (the pointer moves as you right click).

He would like to be able to do something like use a modifier key and normal left click and have that register as a right click in the UI. Unfortunately this netbook does not have the typical right menu shortcut key on the keyboard.

He is pretty sure this is not possible in standard GNOME, but how about Unity? Is this possible?

share|improve this question
2  
Does your friend have a menu key in his keyboard? It is supposed to be a keyboard replacement for a right click.. –  jokerdino Jan 23 '12 at 5:08

2 Answers 2

up vote 4 down vote accepted

Install xdotool and xbindkeys:

sudo apt-get install xdo-tool xbindkeys

Create a binding in $HOME/.xbindkeysrc for e.g. Alt+:

"xdotool click --clearmodifiers 3"
  alt + b:1

And then start xbindkeys (typically, this would go into your xinit file so that it is started everytime you log in.)

Now the problem here is that although it should work with the --clearmodifiers option, something (Unity? Compiz? The global menu?) is preventing the alt key from getting released. An ugly workaround (until someone gives you a better answer) would be to add a sleep 1 and release the alt key yourself:

"sleep 1; xdotool click --clearmodifiers 3"
   alt + b:1

So: if you press alt and click the left mousebutton, then release alt within 1 second, you will get a right mouseclick (although with 1 second waiting time).

share|improve this answer
    
I had to do sudo apt-get install xdotool xbindkeys in 14.04 –  velcrow Jul 30 at 21:04

xbindkeys is good, and I still use it for other functions; however, you could also go to settings -> accessibility -> simulated second click. This allows you holding the left click, long enough, to provoke the right click. I was looking for a faster approach when I found this article; however, it is still ~1 second wait, even on the shortest interval setting. Good luck, and please tell me if you find a way to bind a specific key for right click (e.g. command/apple key would allow as an alternate right click, while it was being held simultaneously with the mouse pad). Is there now way to make a phrase or anything for programs, such as autokey?

share|improve this answer

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.