Bases: kivy.input.provider.MotionEventProvider
Tuio provider listen to a socket, and handle part of OSC message
- /tuio/2Dcur
- /tuio/2Dobj
Tuio provider can be configured with the [`input]` configuration
[input]
# name = tuio,<ip>:<port>
multitouchtable = tuio,192.168.0.1:3333
You can easily handle new tuio path by extending the providers like this
# Create a class to handle the new touch type
class TuioNEWPATHMotionEvent(MotionEvent):
def __init__(self, id, args):
super(TuioNEWPATHMotionEvent, self).__init__(id, args)
def depack(self, args):
# Write here the depack function of args.
# for a simple x, y, value, you can do this :
if len(args) == 2:
self.sx, self.sy = args
self.profile = ('pos', )
self.sy = 1 - self.sy
super(TuioNEWPATHMotionEvent, self).depack(args)
# Register it to tuio touch provider
TuioMotionEventProvider.register('/tuio/PATH', TuioNEWPATHMotionEvent)
Create a touch from a tuio path
Register a new path to handle in tuio provider
Start the tuio provider
Stop the tuio provider
Unregister a new path to handle in tuio provider
Update the tuio provider (pop event from the queue)
Bases: kivy.input.providers.tuio.TuioMotionEvent
A 2dCur TUIO touch.
Bases: kivy.input.providers.tuio.TuioMotionEvent
A 2dObj TUIO object.