companion
companion copied to clipboard
Short/Long Press
Is this a feature relevant to comapnion itself, and not a module?
- [X] I believe this to be a feature for companion, not a module
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the feature
A Long Press (ie holding a button down for 500ms) would be useful to stack more usability into a single button.
Similar to how we can choose a Latch/ Toggle function for a button, it would help to have a Short/Long function as well.
A Long Press button would have a check box to turn on the mode, plus a field to enter the ms for a desired delay before the Long Press is activated (for example, 500ms). Any "Short Press" under the specified ms duration (ie <500ms) would trigger the Actions within the "Press Actions" field, whereas if the button is held longer than the specified duration (>500ms), it would trigger the actions within the "Release Actions" field – and most importantly, would NOT trigger the short press actions.
Usecases
While we can currently fire one action and then set a delay to fire a second action, there's no way to fire the second action without always firing the first action. This Long Press function would easily separate assigning different actions to Short or Long presses.
For example, a short press could select Input 1 to Preview, and a Long Press on that same button could put Input 1 into AUX OUT.
I have been planning to look at this once #1630 was merged, as it now has I shall pick this up when I have some time.
As the step mode gives the ability to an an infinite number of steps to a button, the same architecture could be used to allow for multiple duration periods.
There will be a press actions field which is executed immediately. Then there will be one or more release actions blocks, each with a different duration assigned. And the one matching the duration of the press will be executed
Thanks Julian,
In terms of matching duration, it would be "less than" or "greater than", or a window of time, rather than a specific time?
The different Button Types makes good sense. Look forward to seeing what you do with it!
@Julusian I want us to abstract the types into their own classes and make a base for action_run
and other necessary support functions. Just so ya know.
Any update on this? Our use-case is to prevent inadvertant operation of some functions.
As an example, we have 1 button to switch all cameras off via Visca protocols. A 3-second delay before triggering the actions would be a great safety enhancement!
This is highly likely to be in the next major release of Companion, but that is not yet certain and that release doesnt have a plan for release date yet
Smadds - you can achieve your particular use case already with a regular button. Add the 3000ms delay to the Visca actions in the "Press actions" section, and add an "Abort actions on this button" command to the "Release action" section
Hi Julian! I've taken a look though the implementation of the long press function in v3 and have a thought – currently the long press only releases when the button is released...is there a way for this to auto-timeout/auto-release? For example, if I have a 0ms duration group, and a duration group with a 500ms delay, the 500ms button doesn't begin the actions until the button is released. I get that this is important if you had a series of three or more (ie if you don't want the first two actions to be triggered while holding the button long enough to release the third delay), but it would be helpful to have an auto-release option as well. Otherwise I'll be holding the button long beyond the assigned 500ms and waiting for button feedback that's not coming until release.
Let me know if I'm thinking about this the right way!
One other related thing, is there an easy way to implement a double-click that would be registered as a unique action? (ie, a double click would not also trigger a short press or long press in the process). I have Smartthings buttons around my home, and I do find that those three combinations (short press, long press, double press), are a good trio of muscle memory without getting too complicated to remember all the different actions assigned.
Cheers, David
I was hoping that kind of delayed execution while pressed wouldnt be necessary, because those could still be triggered by a delayed action from the press. (Potentially all you need is an action which triggers the release of the button, preserving how long you had it pressed for?) But I am happy to revisit adding an option to make certain groups execute while the button is still held.
I am open to supporting double clicks, but that is going to take some thought to implement. To make it work sensibly the short release actions will need to be delayed for many milliseconds, until the threshold for the second press has passed. Perhaps this can be done as another checkbox option, or it might need to be a separate implementation for the type of button. Perhaps this idea is a duplicate of #1125?
I imagine a double-press could be a check box option, as it will need to alter the minimum release time so that a "single-press" action is not also triggered.
I think adding a checkbox option within the edit field of a delayed action (a checkbox to auto release at the appointed delay time) would be useful. As the person building a button, I may remember how long I need to hold for, but for other team members coming to a Companion layout cold, they will look to button feedback to understand the cues.
Several Use cases here for auto-release of the delays are:
0ms short press - PTZ Recall 500ms Long press - PTZ Save a new recall position (and importantly, NOT also "recall" the previous position), and for the action to take place once 500ms of long press has been achieved, so that the user sees feedback that the new recall position has been saved.
....vs the Use case of seeing each delayed action take place while still holding. Ie I have a button that rotates through multiple Preview inputs for the ATEM on a single button, for example:
0ms Black into preview 500ms Color 1 into preview 1000ms Color 2 into preview 1500ms Bars into preview
All these trigger automatically (which of course we can do already with normal delays and "abort actions all on button" on Release. What could be interesting here is visual feedback changes on the button (without actually triggering the actions themselves) to show what the cause and effect will be. Ie, holding the button, you would see Black, Color 1, Color2, Bars rotate, but the specific action is only taken on button release. Then this type of button could be use for clean Program or AUX routing, rather than just in Preview.
....vs 3rd Use case for Powerpoint slide shows, where you don't want the middle action to trigger:
0ms - previous Slide 500ms - go to first Slide 3000ms - reset
In this instance, it would be helpful to have the option for the 3000ms "reset" action to be auto-released once the button is held for 3000ms+, but not to auto-release the 500ms action to "go to first slide".
Lastly - thank you for implementing this! It's exciting to see this development, as it will greatly simplify page builds, and exports and imports... (and help me avoid the complexity of placing short press buttons on back end pages and linking via OSC actions......)
i tried the new feature with "short release" and "release after xx" actions. i have to give David credit in his ideas on improving this. testing with a simple action of "cam 1 to program" and "send cam 1 to aux" as short and long press actions shows that it would be nice if you can see the action happening before releasing the button. i imagine that its a pain to programm something that should do everything and should fit everyones needs :-D but i think a checkbox for "autorelease" could make some interesting options for this... BTW if i add a delayed button release in the press actions, it will not trigger the "release after xx" actions at the moment. also its a matter of concept for users how they are building actions in their minds... i think it would be nice to have not only short release and release after actions but also "short press" and "pressed loger than" actions too ;-) this would open some more universal methods of creating actions more easy... or may be only for my mindset and kind of thinking the chronology of actions to make my ideas happening :-D
I do intend to make it so that release after xx
can be toggled to held for xx
on a per-group basis.
What do you mean by the autorelease
checkbox?
if i add a delayed button release in the press actions, it will not trigger the "release after xx" actions at the moment
Huh yeah I didn't think about how the internal actions should interact with this. Should they? Perhaps a screenshot of how you expect to use this would be good.
also "short press" and "pressed loger than" actions too
I dont follow how either of these are different to the groups added by this feature already. Could you elaborate on what you think they should do differently?
It is now possible to set a delayed action group as to be run while held.
Additionally, it is fixed so that using the internal: Press button
and related actions will be run aware of the surface/source that triggered it. Meaning it is possible to trigger the long presses with those actions
Genius, thank you!