tweigel-dev / python-tuio

This repository is a python3 implementation of the TUIO protocol.
MIT License
3 stars 4 forks source link

How does TuioListener move or click the mouse? #18

Open homuraLan opened 1 year ago

homuraLan commented 1 year ago

I saw: class MyListener(TuioListener): def add_tuio_cursor(self, cursor): print("detect a new Cursor") assert type(2) == type(cursor.session_id) # look if sessionid is a number def remove_tuio_cursor(self, cursor): print("Cursor disapered") assert type(2) == type(cursor.session_id) # look if sessionid is a number def update_tuio_cursor(self, cursor): print("recognize a Cursor") assert type(2) == type(cursor.session_id) # look if sessionid is a number

But I don't know how to trigger the cursor Look forward to your reply Thank you

homuraLan commented 1 year ago

I saw:

    class MyListener(TuioListener):
        def add_tuio_cursor(self, cursor):
            print("detect a new Cursor")
            assert type(2) == type(cursor.session_id)   # look if sessionid is a number
        def remove_tuio_cursor(self, cursor):
            print("Cursor disapered")
            assert type(2) == type(cursor.session_id)   # look if sessionid is a number
        def update_tuio_cursor(self, cursor):
            print("recognize a Cursor")
            assert type(2) == type(cursor.session_id)   # look if sessionid is a number

But I don't know how to trigger the cursor Look forward to your reply Thank you

homuraLan commented 1 year ago

If I want to implement it, do I need to move the mouse myself? I'm not very clear about tuio's ability

tweigel-dev commented 1 year ago

It is quite a while ago but I think you have to hold the click and drag the mouse in the simulator.

homuraLan commented 1 year ago

这是很久以前的事了,但我认为您必须在模拟器中按住单击并拖动鼠标。

Thanks for your reply,This means that tuio does not have this function. I need to move or click by myself, right?

tweigel-dev commented 1 year ago

Tuio is a protocol, which can be used to transfer touch information. So yea you have to touch a screen . To simulate this, there is this simulator you and use with the mouse cursor. To have a better user experience you can use an tuio app , I know in the past there were some touchscreen tester apps supporting tuio protocol.

homuraLan commented 1 year ago

Tuio is a protocol, which can be used to transfer touch information. So yea you have to touch a screen . To simulate this, there is this simulator you and use with the mouse cursor. To have a better user experience you can use an tuio app , I know in the past there were some touchscreen tester apps supporting tuio protocol.

I know, but I have encountered some TuioServer implemented by C #, which can achieve touch triggering without requiring a touch screen when sending cursors.

I know