Is Perspective Workstation Edition intended to support touch events? Or is there something to configure for touch events to work? All of our HMI buttons use a touch event and seem to not work until we move them to a mouse click event. I tried searching for documentation but haven’t found anything but I may have missed it.
I’m going to tag @jcoffman so he can chime in when he’s back next week, but I’ll attempt to answer anyway.
I think it’s going to depend on what kind of device you’re using and how the touchscreen drivers work. If it’s like any other common HMI panel in the past decades it just has touch drivers that emit mouse events, not touch events, and you’ll need to have your code in mouse events as well.
It seems JavaFX, the UI framework Workstation is written on, does have some kind of support for touch events, but it may require that the device/drivers be actually emitting touch events. Not sure.
Now that workstation is in a final release (installed from Perspective 8.1.2) it appears to handle touch and mouse click events the same as when using chrome. This may be a little outside the scope of this post, but is it possible to have the mouse down event fire as soon as something is touched. Currently mouse down only fires if the touch (with a finger on a touch screen that is) if the touch is quick and removed (so its kind of like mouse click). If you drag your finger at all mouse down doesn’t fire and you need to use a touch event. This may be the intended use, but it creates one annoying situation.
The primary purpose of the views we are developing are for touch screens, so that needs to work the best. We’ve found that using touch events gives you the best performance because someone can start their touch on a button and if the finger moves slightly it doesn’t matter if they end their touch no longer on the button (as onActionPerformed or onClick) requires. This makes it more usable when working fast on the touchscreen. However, if you now want to open those views on a computer you need to put chrome into dev mode to simulate touch events or the button won’t work. If onMouseDown could behave like onTouchStart/onTouchEnd it would be helpful for using views on different devices.