Where to put Xorg's "emulate3button" these days?

cracauer@

Developer
As mentioned before, I lost track of all the layers of input processing and I fail to place "emulate3button" correctly.

Right now I have this in /usr/local/etc/X11/xorg.conf.d/button3.conf :
Code:
Section "InputClass"
    Identifier "Trackpoint"
    MatchIsPointer "on"
    Option "Emulate3Buttons" "True"
EndSection

Xorg.0.log has nothing about Emulate3Buttons, in fact it doesn't even say that this file is being read. This is for a laptop with trackpad.

Any ideas?
 
x11/nvidia-xconfig puts it in InputDevice
Code:
Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection
 
x11/nvidia-xconfig puts it in InputDevice
Code:
Section "InputDevice"
    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/sysmouse"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Thanks. Still no go (with it set to "yes").

This used to be so easy, what happened?
 
The preferred method to handle input devices these days is through the libinput(4) Xorg driver from package x11-drivers/xf86-input-libinput, which is pulled in automatically when installing Xorg.

The driver is loaded automatically when Xorg is started. Have a look at /var/log/Xorg.0.log and search for 'libinput' occurrences without a configuration.

I have a Elantech touchpad on a ThinkPad. The three buttons mapping is configured with the "Tapping" option on. One finger left, two finger right, three finger emulates middle button.

The /usr/local/etc/X11/xorg.conf.d/libinput.conf I have
Code:
Section "InputClass"
    Identifier    "libinput Touchpad"
    MatchIsTouchpad    "on"
    MatchDevicePath "/dev/input/event*"
    Driver        "libinput"
    Option        "NaturalScrolling" "on"
    Option        "Tapping" "on"
    Option        "TappingDrag" "on"
    Option        "TappingDragLock" "on"
EndSection
I used the "InputClass" directive instead of the device configuration as recommended in the manual.

See "ButtonMapping", "TappingButtonMap" options and BUTTON MAPPING section in the libinput(4) manual.
 
The preferred method to handle input devices these days is through the libinput(4) Xorg driver from package x11-drivers/xf86-input-libinput, which is pulled in automatically when installing Xorg.

The driver is loaded automatically when Xorg is started. Have a look at /var/log/Xorg.0.log and search for 'libinput' occurrences without a configuration.

I have a Elantech touchpad on a ThinkPad. The three buttons mapping is configured with the "Tapping" option on. One finger left, two finger right, three finger emulates middle button.

The /usr/local/etc/X11/xorg.conf.d/libinput.conf I have
Code:
Section "InputClass"
    Identifier    "libinput Touchpad"
    MatchIsTouchpad    "on"
    MatchDevicePath "/dev/input/event*"
    Driver        "libinput"
    Option        "NaturalScrolling" "on"
    Option        "Tapping" "on"
    Option        "TappingDrag" "on"
    Option        "TappingDragLock" "on"
EndSection
I used the "InputClass" directive instead of the device configuration as recommended in the manual.

See "ButtonMapping", "TappingButtonMap" options and BUTTON MAPPING section in the libinput(4) manual.

OK, that works for the tapping. Thank you so much!

I still don't have the 2 actual buttons work, even though I added this:
Code:
Section "InputClass"
    Identifier     "libinput Touchpad"
    MatchIsTouchpad    "on"
    MatchDevicePath "/dev/input/event*"
    Driver         "libinput"
    Option         "NaturalScrolling" "on"
    Option         "Tapping" "on"
    Option         "TappingDrag" "on"
    Option         "TappingDragLock" "on"
    Option         "Emulate3Buttons" "yes"
EndSection
Section "InputClass"
    Identifier     "libinput Buttons, hopefully"
    MatchIsPointer "on"
    MatchDevicePath "/dev/input/event*"
    Driver         "libinput"
    Option         "Emulate3Buttons" "yes"
EndSection

Any idea how I match the buttons? They don't seem to be part of the trackpad.
 
I still don't have the 2 actual buttons work
I though the problem was with the trackpad, didn't realize from the button3.conf configuration in your opening post you meant physical buttons.

Remove all Option "Emulate3Buttons" "yes" and add the following section to the touchpad configuration
Code:
Section "InputClass"
    Identifier    "Middle Button Emulation"
    MatchIsPointer    "on"
    Option        "MiddleEmulation" "on"
EndSection
 
Playing around with the configuration of the touchpad, I've noticed it's not required to set MatchDevicePath and Driver. The driver is loaded, and the device path set, automatically.

This is the latest I configured for a Elantech touchpad on a ThinkPad E15:
Code:
Section "InputClass"
    Identifier    "libinput Touchpad"
    MatchIsTouchpad    "on"
    Option        "NaturalScrolling" "on"
    Option        "Tapping" "on"
    Option        "TappingDrag" "on"
    Option        "TappingDragLock" "on"
EndSection
 
I though the problem was with the trackpad, didn't realize from the button3.conf configuration in your opening post you meant physical buttons.

Remove all Option "Emulate3Buttons" "yes" and add the following section to the touchpad configuration
Code:
Section "InputClass"
    Identifier    "Middle Button Emulation"
    MatchIsPointer    "on"
    Option        "MiddleEmulation" "on"
EndSection

Ahhh, that works. Thanks again!
 
Back
Top