middle-button-emulation.rst 1.8 KB

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