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 any touches are created 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

バージョン 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

バージョン 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), a multitouch_sim value will be added to the touch’s profile, and a multitouch_sim property will be added to the touch. By default, multitouch_sim is True and multitouch will be emulated for that touch. If, however, multitouch_on_demand is added to the config:

[input]
mouse = mouse,multitouch_on_demand

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

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

Following is a list of the supported values for the profile property list.

Profile value Description
button Mouse button (one of left, right, middle, scrollup or scrolldown). Accessed via the ‘button’ property.
pos 2D position. Also reflected in the x, y and pos properties.
multitouch_sim Specifies whether multitouch is simulated or not. Accessed via the ‘multitouch_sim’ property.