33
33
will emulate multi-touch. If the touch has been initiated in the above manner
34
34
(e.g. right mouse button), multitouch_sim will be added to touch's profile,
35
35
and property `multitouch_sim` to the touch. By default `multitouch_sim` is
36
- False. If before mouse release (e.g. in on_touch_down/move) `multitouch_sim`
36
+ True and multitouch will be emulated for that touch. However, if
37
+ `multitouch_on_demand` is added to the config::
38
+
39
+ [input]
40
+ mouse = mouse,multitouch_on_demand
41
+
42
+ then `multitouch_sim` defaults to `False`. In that case, if before mouse
43
+ release (e.g. in on_touch_down/move) `multitouch_sim`
37
44
is set to True, the touch will simulate multi-touch. For example::
38
45
39
46
if 'multitouch_sim' in touch.profile:
@@ -124,6 +131,7 @@ def __init__(self, device, args):
124
131
self .alt_touch = None
125
132
self .disable_on_activity = False
126
133
self .disable_multitouch = False
134
+ self .multitouch_on_demenad = False
127
135
128
136
# split arguments
129
137
args = args .split (',' )
@@ -135,6 +143,8 @@ def __init__(self, device, args):
135
143
self .disable_on_activity = True
136
144
elif arg == 'disable_multitouch' :
137
145
self .disable_multitouch = True
146
+ elif arg == 'multitouch_on_demand' :
147
+ self .multitouch_on_demenad = True
138
148
else :
139
149
Logger .error ('Mouse: unknown parameter <%s>' % arg )
140
150
@@ -183,7 +193,7 @@ def create_touch(self, rx, ry, is_double_tap, do_graphics, button):
183
193
id = 'mouse' + str (self .counter )
184
194
args = [rx , ry , button ]
185
195
if do_graphics :
186
- args += [False ]
196
+ args += [not self . multitouch_on_demenad ]
187
197
self .current_drag = cur = MouseMotionEvent (self .device , id = id ,
188
198
args = args )
189
199
cur .is_double_tap = is_double_tap
0 commit comments