Quick search

Mouse provider implementation

On linux systems, the mouse provider can be annoying when used with another multitouch provider (hidinput or mtdev). The Mouse can conflict with them: a single touch can generate one event from the mouse provider and another from the multitouch provider.

To avoid this behavior, you can activate the “disable_on_activity” token in the mouse configuration. Then, if there are any touches activated by another provider, the mouse event will be discarded. Add this to your configuration:

[input]
mouse = mouse,disable_on_activity

Using multitouch interaction with the mouse

New in version 1.3.0.

By default, the middle and right mouse buttons, as well as a combination of ctrl + left mouse button are used for multitouch emulation. If you want to use them for other purposes, you can disable this behavior by activating the “disable_multitouch” token:

[input]
mouse = mouse,disable_multitouch

Changed in version 1.9.0.

You can now selectively control whether a click initiated as described above will emulate multi-touch. If the touch has been initiated in the above manner (e.g. right mouse button), multitouch_sim will be added to touch’s profile, and property multitouch_sim to the touch. By default multitouch_sim is True and multitouch will be emulated for that touch. However, if multitouch_on_demand is added to the config:

[input]
mouse = mouse,multitouch_on_demand

then multitouch_sim defaults to False. In that case, if before mouse release (e.g. in on_touch_down/move) multitouch_sim is set to True, the touch will simulate multi-touch. For example:

if 'multitouch_sim' in touch.profile:
    touch.multitouch_sim = True

Following is a list of the supported profiles for MouseMotionEvent.

Profile name Description
button Mouse button (left, right, middle, scrollup, scrolldown) Use property button
pos 2D position. Use properties x, y or pos`
multitouch_sim If multitouch is simulated. Use property multitouch_sim. See documatation above.