Now that we have StreamDeck integration, I would like to be able to test the condition of a StreamDeck key in an If/Then action.
You will have to track the state with pressed and released triggers. Which is somewhat fragile. But there is no other way I'm afraid.
You can have a trigger for repeating while it is down so that you can use that.
-
Trigger While key is down (every P seconds)
- Set variable Last Seen to calculation NOW()
-
trigger on release
- Set variable Last Seen to calculation NOW() - 99999
Then condition:
- If variable NOW() - Last Seen < P+1
should work reasonably reliably.
How do I do every P seconds?
All best-
Mike
This seems to necessitate having the same trigger for both actions, but KM is asking me which one it should execute.
All best-
Mike
One can be "pressed", one can be "down", and they would count as different triggers.
But that probably wont work because I think it "is down" repeating will time out after a short while.
Is there a way to test if ANY key is pressed on the Streamdeck. That way I can have a global macro for every key that can set a variable 0 for UP and 1 for Down. And not have to make a separate test for each key.
I don't think so. I think you'll need to create a separate trigger (in the same macro) for each key.
Yeah. Good. That’ll work. Thank you.
All best-
Mike