Looping Three-way Toggle with Stream Deck

I'd like to make a three-way toggle using one Stream Deck button. Is this possible using variables? All the actions are mouse clicks in Chrome, and this toggle would save me around 1500 clicks per day. I already have two actions programmed on a standard toggle, but need a third on the same button. If it matters, I'm using KM Link to control the Stream Deck.

Press One - Action One
Press Two - Action Two
Press Three - Action Three
Press Four - Start Over with Action One
Press Five - Action Two
Press Six - Action Three
etc

Here's one way to do it, enter the actions you want in the switch case based on the state of the global variable "action_count" which increments every time it's run, and is set to "1" once it's over 3.

3 Action Test.kmmacros (6.9 KB)

Thank you for your quick response! I'm new to KM and clearly missing a step, the macro is enabled and I'm simply trying to make a keystroke to test. Could you elaborate a bit more what steps are required?

Welcome to the KM forums!

Apologies, i had a typo in my macro, the switch case was looking for "action" instead of "action_count". Here's a fixed one, with some visible feedback when you run it, which should help make it clear:

Just replace the "Display text briefly" actions, with your desired actions.

3 Action Test.kmmacros (4.6 KB)

edit: To set it up with the streamdeck, you can get rid of the toggle, and just execute this macro using KM link. If you want to display feedback on the streamdeck button about which action step you are on, you can use the "Keyboard Maestro" stream deck integration, which allows you to dynamically set the text/icon of the streamdeck button from keyboard maestro.

1 Like

Thank you! You just saved me 30 minutes every day and my bum wrist!

1 Like