Debian Codegraph @

doc/user/middle-button-emulation.rst

raw
1 .. _middle_button_emulation:
2
3 ==============================================================================
4 Middle button emulation
5 ==============================================================================
6
7 Middle button emulation provides users with the ability to generate a middle
8 click even when the device does not have a physical middle button available.
9
10 When middle button emulation is enabled, a simultaneous press of the left
11 and right button generates a middle mouse button event. Releasing the
12 buttons generates a middle mouse button release, the left and right button
13 events are discarded otherwise.
14
15 The middle button release event may be generated when either button is
16 released, or when both buttons have been released. The exact behavior is
17 device-dependent, libinput will implement the behavior that is most
18 appropriate to the physical device.
19
20 The middle button emulation behavior when combined with other device
21 buttons, including a physical middle button is device-dependent.
22 For example, :ref:`clickpad_softbuttons` provides a middle button area when
23 middle button emulation is disabled. That middle button area disappears
24 when middle button emulation is enabled - a middle click can then only be
25 triggered by a simultaneous left + right click.
26
27 Some devices provide middle mouse button emulation but do not allow
28 enabling/disabling that emulation. Likewise, some devices may allow middle
29 button emulation but have it disabled by default. This is the case for most
30 mouse-like devices where a middle button is detected.
31
32 libinput provides **libinput_device_config_middle_emulation_set_enabled()** to
33 enable or disable middle button emulation. See :ref:`faq_configure_wayland`
34 and :ref:`faq_configure_xorg` for info on how to enable or disable middle
35 button emulation in the Wayland compositor or the X stack.