I need to have a jog button to run something as long as the button is pressed.
To do this, I made a button with 2 events: onMouseDown and onMouseUp which sets and resets a bit.
This works fine when using a mouse. However: with a touchscreen, I experience right-click behaviour:
Everyone here will highly suggest you to not use a momentary button at all in perspective. You need to use start and stop buttons to accomplish this as you'll run into issues trying to use a momentary style button beyond what you've already experienced.
I would agree that you should not use a momentary button if possible. In our situation, the operators really wanted this feature and we provided a fail safe button if it did get stuck. I also added some PLC timeout logic if this happened too. With that said, we use this all the time on a 24/7 operation and have zero issues. The CSS code was added to the following file:
I haven't tested it myself but I believe the standard theme files are replaced on ignition upgrade with defaults meaning you’ll lose your edits.
Regardless, editing the base theme files is not recommended for multiple reasons such as mentioned above, inability to identify what modifications have been made to defaults which is particularly important for diagnosing potential issues that are a result of modifications, and others