LogicMachine Forum
Short and long press - Printable Version

+- LogicMachine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visu beta testing (https://forum.logicmachine.net/forumdisplay.php?fid=24)
+--- Thread: Short and long press (/showthread.php?tid=6122)



Short and long press - DGrandes - 18.09.2025

Hi,

I was trying to create a button with short and long press functionality, but I can’t do that. First, I’m not sure if the jQuery library has been disabled, and on the other hand, I can’t achieve it directly with querySelector. I want something similar to this: https://forum.logicmachine.net/showthread.php?tid=275
I also realized that JavaScript is loaded before the document, and I need to add a delay before reading classes or values.

Thanks!


RE: Short and long press - admin - 18.09.2025

Old JS won't work in new Visu. New JS documentation is still being worked on.
What is the use case for short/long press?


RE: Short and long press - DGrandes - 19.09.2025

I imagined that Smile.

It’s to do something similar. For example, run scenes or save with a long press, send a general off (off with long press). Or, what would be easier, configure the action in the button and only execute with a long press… Basically, those would be the two I want to do. I imagine that by having the code for these two, I’ll be able to create something else if I need it.

Thanks!