3

I need to add support for multi-touch gestures in my Java application, which is deployed on Linux. I've found http://lii-enac.fr/en/architecture/linux-input/multitouch-howto.html which appears to be a good approach for getting the hardware to work. (Although I haven't started doing the kernel patching yet...)

The next question will be how to get the gestures up into my java code. I found Mt4J, but that project seems to do tons and tons of stuff other than just handling multi-touch gestures. I already have an OpenGL-based rendering engine, thank you very much! :)

It seems really strange to me that there isn't a JSR for getting these multi-touch events up into the AWT event handling infrastructure.

I really don't need something to interpret the gestures for me. I just want to know when there are multiple inputs at the same time, so I can act on them.

Suggestions?

Joshua Smith
  • 3,689
  • 4
  • 32
  • 45
  • Possible answers: http://stackoverflow.com/questions/4456961/is-there-a-java-api-for-touching-devices-such-as-tablets – assylias Apr 10 '12 at 14:10
  • That references MT4J, a Sun tech talk in which they build a multi-touch input device (seriously?) and don't give any indication of how they got the events into Java, and pointers to sparsh-ui, which is a separate server process that you can connect to. This all seems like much more work to integrate than is reasonable, given the pervasive nature of multi-touch interfaces, but perhaps it really is the state of the art. Is Java on the desktop dead? How could it not already be handling multi-touch events? I guess I'll go start digging into sparsh... – Joshua Smith Apr 10 '12 at 14:37
  • 1
    Java FX 2, which is supposed to be the future Java desktop API, should be available for Linux soon (already available on Windows & OSX) and should support multi touch devices (I don't think that that feature is released yet). See their [roadmap](http://www.oracle.com/technetwork/java/javafx/overview/roadmap-1446331.html) for more details. – assylias Apr 10 '12 at 15:09
  • Ah, that makes a little sense. I recalled hearing that JavaFX was dead, but apparently that was just that scripting language nonsense. – Joshua Smith Apr 10 '12 at 15:51
  • but JavaFX2 on Ubuntu 16.04 doesn't seem to be receiving any multitouch events - and we aren't sure if we just aren't doing it right or if it isn't supported. – vextorspace Mar 07 '17 at 01:07

1 Answers1

0

I created an API specifically for this. It isn't fully complete yet but it works fairly well. It is available at: https://github.com/shahbaz-man/libjam-mt View the README.md for instructions on how to setup.

TameHog
  • 950
  • 11
  • 23
  • What we ended up doing was using a TUIO library. TUIO seems to be a pretty universal approach to getting multi-touch events into linux apps. – Joshua Smith Apr 06 '15 at 19:34
  • I didn't really want to use TUIO for my application so this seemed the best way for .me – TameHog Apr 06 '15 at 19:35