Ubuntu 18.04. When I click the middle mouse button, it should double click. Thanks.
EDIT: Using Unity desktop.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.
Sign up to join this communityOS: Ubuntu 18:04
Required Packages: xdotool
and xbindkeys
you can install these packages with sudo apt install xdotool xbindkeys
gedit .xbindkeysrc
Paste the below content
"xdotool click --repeat 2 1"
b:2
Save the file and run xbindkeys --poll-rc
now your Middle Click should work as double click.
from man xdotool
some of the content
click [options] button
Send a click, that is, a mousedown followed by mouseup for the
given button with a short delay between the two (currently 12ms).
Buttons generally map this way: Left mouse is 1, middle is 2, right
is 3, wheel up is 4, wheel down is 5.
--clearmodifiers
Clear modifiers before clicking. See CLEARMODIFIERS below.
--repeat REPEAT
Specify how many times to click. Default is 1. For a double-
click, use '--repeat 2'
Tested on Ubuntu 18.04.3
Workaround
If you have installed unity like this sudo apt install unity
then use below content in .xbindkeysrc
file
"xdotool click --repeat 2 1"
b:2 + Release
Tested on Ubuntu 18.04 with Unity session.
I've had little luck with btnx
and xdotool
so, if you're on Linux Mint
or other Ubuntu
-based distro, I would suggest input-remapper available on the repos:
sudo apt install input-remapper
Then, configure a desired button with the following code:
repeat(2, key(BTN_LEFT).w(50))
This will repeat the left button mouse with a 50ms delay. Using the standard key(BTN_LEFT).key(BTN_LEFT)
did not worked for me, presumably because no ButtonRelease
event was sent in time to be detected by cinnamon. Enjoy!
xdotool click --repeat 2 1
bind this to b:2 with xbindkeyssudo apt install unity
??sudo apt install unity
and it is xsession only not wayland. I have triedxdotool click --repeat 2 1
binding it with letterp
for testing purpose with xbindkeys and it worked. for b:2 I need to dig.. but unfortunetly I dont have external mice and my laptop touchpad tap to clicks are not working at all with unity.