Press and Hold actions with pause until condition

Could you use a SD multi-action; one action would activate the app and another would activate push-to-talk while held?

Very frustrating not having my SD to hand...

This sounds like an excellent work around. I wasn't aware I could configure multi-actions. I'll give it a shot!

On another note, I figured out that if I configure the macro using a key that isn't on the stream deck, it works fine. It appears to only be a problem with the stream deck buttons.

What about triggering the macro using a hotkey which is in fact emulated by the SD?

I tried that too with f15. No joy. Everything relies on KM recognizing the release of the SD button, and that's never registered.

Multi-function didn't work either because you can't hold a key with multi-function. It runs on button release.

I wonder if that might be an Fn key limitation...? I just got back and tested holding keys via SD hotkey actions and it seems to work. Maybe try a different hotkey?

Would you mind sharing your test macro?

There isn't one. I just tried holding a Stream Deck hotkey and it worked. So set one up to simulate ⌥Space and you're done (maybe).

Are you suggesting to setup the ⌥Space hotkey directly in the SD without using KM? I know that works. It doesn't bring Teams to the front first though. The KM macro should perform the following:

Upon press and hold of SD key:
Bring Microsoft Teams to the front
Press and hold ⌥Space
Pause until "condition"

Upon release of the SD key:
Set "condition"

The problem is that while the first macro is paused, the release of the SD key isn't recognized in the debugger. If I move my mouse or touch another key while I'm holding the SD key, then when I release the SD key, it is recognized in the debugger, and the second macro fires. This logic works with standard keyboard keys. For example, it works if the action key is left shift.

Ok I think I might have an idea of (one) problem. When you release the button, ⌘ and Space are being held down, so in order to register the release, the release trigger would need to be Stream Deck RC31 released *while* ⌘Space is held down, which can't be accounted for. (I have tested and confirmed that the release is not recognised if other keys are held. Simple modifiers would be fine, but that doesn't help us.)

In order to negate the trigger/keystroke conflict:

  • Can you activate/deactivate Push-To-Talk via AppleScript?
  • Can you activate/deactivate Push-To-Talk via a menu item?
  • Can you activate/deactivate Push-To-Talk via any means other than a key command?

So, this is what's confusing and why I'm not sure I agree with your logic on release a button while other buttons are pressed. Here's a sample macro with 2 triggers. This same macro works with the shift key trigger but doesn't work with the SD button trigger. This seems to be specific to the SD.

Screen Shot 2022-08-16 at 10.15.27 AM

According the the developer of KM - Peter Lewis - it isn't.

Have a look at this thread in the KM Forum and you'll see a pair of macros surprisingly similar to your own originally posted ones.

1 Like

I think your best bets are:

  1. Use AppleScript or a Menu Item to enable Push-To-Talk
  2. Have a second button right next to your Push-To-Talk button that activates Teams, which you'll press immediately before the main button.

It looks like he's trying to use KM to simulate a modifier key while he presses other keys. I'm not generating modifiers in this fashion, and I'm not pressing other keys while the usb device button is pressed. As you can see in my latest sample, KM is absolutely able to accomplish the goal as long as the button isn't on the SD.

At the risk of looking like a noob...

Where is this action to be found? It's a new one on me. I'd like to try to recreate your recent macro to see what's going on. I suspect the reason it doesn't work is that this action may work with keys but not USB Device Keys, which is what Stream Deck buttons are. If this is the case, we may be conflating issues, and my logic might still hold water.

It's the "Pause Until Change" action (rather than a modified "Pause Until" action, which might be why you've missed it).

1 Like

Can you answer these? If there is a way other than the key command, we might be in business.

Short answer -- nope.

Long answer -- it's Microsoft! It's taken them (at least) 5 years to implement the oft-requested push-to-talk feature and we should be grateful for what little functionality they've deigned to grant...

1 Like

Try swapping the first action for an "Activate a Specific Application" one that targets Teams. There really is no need to spawn another macro, and that might be what's breaking things for SD.

The forum rules prevented me from posting this 2 hours ago. Apparently I reached a post limit. Anyway, after enough fiddling, I finally got it to work as expected. Here is the solution. Another benefit of this configuration is that I can use the keyboard to activate the macro and bring Teams to the front first using the originally defined Teams keyboard shortcut.

Screen Shot 2022-08-16 at 11.08.22 AM

Screen Shot 2022-08-16 at 11.07.04 AM


I've just seen this, and thought it might be of interest to anyone reading this thread. Looks like the BTT plugin might be really powerful for things like this!

BetterTouchTool and Stream Deck -

1 Like