Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 8913  / 3 Years ago, sun, november 14, 2021, 10:12:35

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?


More From » unity

 Answers
7

Install xdotool and xbindkeys:



sudo apt-get install xdotool 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).


[#40805] Monday, November 15, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
iedncommon

Total Points: 200
Total Questions: 95
Total Answers: 132

Location: Tonga
Member since Mon, Aug 2, 2021
3 Years ago
iedncommon questions
Sat, Jun 4, 22, 18:20, 2 Years ago
Mon, Apr 4, 22, 08:10, 2 Years ago
Tue, Jul 6, 21, 15:11, 3 Years ago
;