You are not logged in.

#1 2017-10-03 12:21:14

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

[SOLVED] Emulate middle mouse button (mouse wheel click)

I have a keyboard with an integrated minimalistic mouse, just a mini trackball and two buttons. I would like a click of both buttons simultaniously to be interpreted as a mouse wheel click.

This snippet in .xprofile used to do the trick, but it stopped working some time ago:

xinput set-prop 10 "Evdev Middle Button Emulation" 1 &

I've also tried this in /etc/X11/xorg.conf.d/20-mouse.conf:

Section "InputClass"
        Identifier "system-mouse"
        MatchIsPointer "on"
        Option "Emulate3Buttons" "on"
EndSection

but that didn't work at all for me.

Is there a reliable way to make this work?

Last edited by MickeyKnox (2017-10-03 15:44:09)

Offline

#2 2017-10-03 12:31:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,874

Re: [SOLVED] Emulate middle mouse button (mouse wheel click)

Check your xorg log whether you're actually using evdev (libinput is default since quite a while)
If not, either explicitly use evdev or try

Option "MiddleEmulation" "true"

(man 4 libinput)

Offline

#3 2017-10-03 15:40:32

MickeyKnox
Member
Registered: 2010-02-27
Posts: 169

Re: [SOLVED] Emulate middle mouse button (mouse wheel click)

I'm probably not using evdev when libinput is the default now for a while. Probably the same while since my solution stopped working smile

I went for your code snippet and it works. Thanks a lot!

Offline

#4 2017-10-03 15:42:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,874

Re: [SOLVED] Emulate middle mouse button (mouse wheel click)

Cool, please always remember to mark threads as [SOLVED] so that others know there's nothing left to do and maybe a solution to find.

Offline

Board footer

Powered by FluxBB