Friday, 23 March 2018

linux laptop - bind key and click to emulate right click


I have replaced my old iBook with a Asus laptop with Linux Mint. On that apple, to right click, you would press AppleKey (keyboard key) and click the mouse. Is there a way to enable similar behavior in Linux? The Asus laptop has a right click mouse key as well as pressing down with two fingers at the same time which my sister can always do correctly, but they only work correctly about 25% of the time for me.



Answer



Install xbindkeys and xdotool


$ sudo apt-get install xbindkeys xbindkeys-config xdotool

Then run


$ xbindkeys-config

and set your chosen key to run the following command


$ sleep .2 && xdotool click 3

You need to have a wait before xdotool clicks due to a bug in one of the programs.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...