ofTouchEvents for Laptop Trackpad or TouchScreen ( cross platform )

I’m figuring how to manage to ofTouchEvents in a laptop. The idea is to receive multitouch events and some gestures as pinch or pan if its possible.

May be tha’s not possible, so ofTouchEvents does not work with trackpad? There is a way to get a cheap hardware to try this in a Laptop? Later on I will be try in Linux with this driver ( USB HID Multitouch Digitizer ).

I’ve seen an implemetation in ofxTuioWrapper example, but i’m not getting any reposonse of that callbacks.

Here is how i’m using them. Should configure ofTouchEventArgs in a specific way ?
Any ideas are wellcome.

      void touchDown(ofTouchEventArgs & touch);
      void touchUp(ofTouchEventArgs & touch);
      void touchMoved(ofTouchEventArgs & touch);
    //Assign Global TUIO Callback Functions

void testApp::touchDown(ofTouchEventArgs & touch){
    cout << "testApp::touchDown" << " cursor added: " + ofToString(touch.id)+
    " X: "+ofToString(touch.x)+
    " Y: "+ofToString(touch.y) << endl;

void testApp::touchUp(ofTouchEventArgs & touch){
    cout << "testApp::touchUp" << " cursor removed: " + ofToString(touch.id)+
     " X: "+ofToString(touch.x)+
     " Y: "+ofToString(touch.y) << endl;

void testApp::touchMoved(ofTouchEventArgs & touch){
    cout << "testApp::touchMoved" << " cursor updated: " + ofToString(touch.id)+
     " X: "+ofToString(touch.x)+
     " Y: "+ofToString(touch.y) << endl;

I am successfully using this fork.

Thanks Thomas, great to see there are some other implementations with some other fixes.
But what exactly you mean by successfully work: the Trackpad/TouchPad events in tuioExample App?
I’ve tried in MacOSX, and Windows bootcamp without success with both addons.

Sorry for the short response. Im using the addon with tuiodroid and tuiopad and I get touch events as expected.
I have not used any other input device.
Does the provided example work?

Right I’m receiving ofTouchEventArgs events but only from mouse ( not trackpad multipointers or any gesture from SO in it ) interaction from my Laptop ( tested in all platforms). Not sure if was this version andreasmuller or fxLange. I guess both works but AndreasMuller already has some fixes for windows.

Thanks, its a nice a idea to test with tuioandroid until I get a compatible touch events with other TUIO devices.

Another point might be to test tallavi ofxGestures commented in this discussion. ofxGestures support ofTouchEventArgs ( nice ! ) but do not allow to track items ( tuio curdor id ) by ID. Son this implementation does not work for such propouses.

@charli_e you might want to have a look at https://github.com/fajran/tongseng, it should convert your trackpad input into tuio events. has been a while since a last used it but also seems to be updated recently. which fork (of arturo’s tuio wrapper) you use shouldn’t matter.

(but mac only I guess)

Thanks @fxlange that’s great. I could use touchpad as a ofxTouchEvents finally with the tuiowrapper for Mac.

For windows, should be ok ofxWinTouch / ofxWin8Touch, but no idea with Linux drivers.

Might this works for Linux?

which fork (of arturo’s tuio wrapper) you use shouldn’t matter

In yours addons the issue to update touch events was not included. After this your addons is working pretty well.

btw I’m getting a bug in tuio client when several buttons are being touch up & down… The cursor is using a bad adress ( cursor_id = -572662307 ) and this crash at drawCursos(). I will add this issue in github soon ( not really sure where ), it happens to me with all actual TuioWrappers arround, in windows and debug mode.