Mimicking Press & Hold Modifiers (Single & Combination) Using Stream Deck

I’m a brand new user to Keyboard Maestro - just using trial version at the moment. It looks really powerful, but I’m holding off purchasing and exploring more until I know it can do the one thing i actually need it to do….

…that is to mimic holding down one, or multiple, modifiers using a single Stream Deck button.

e.g

  • I press and hold a Stream Deck button, which is my mimicked SHIFT button. I then roll my mouse scroll wheel, resulting in what I have on screen to scroll horizontally, until I release the Stream Deck Button
  • I press and hold a different Stream Deck button, which is my mimicked SHIFT + OPTION button. I then roll my mouse scroll wheel, resulting in what I have on screen to zoom-in, until I release the Stream Deck Button
    etc….

I’ve installed the Stream Deck Keyboard Maestro plugin, and was able to do some basic text insertion tests (insert the letter ‘a’ continually when Stream Deck button is pressed and held), as a proof of concept.

However, I am getting nowhere with modifier macros and pause, etc.

I’m thinking surely this is such a common user case for KM and Stream Deck?

HELP!!! Please….

It can be done but is fraught with problems so I, for one, would try to convince you to use your keyboard modifiers instead.

It's difficult to mix simulated and real Events like this -- one often cancels the other. Some software requires the modifiers to be real -- they look for the keyboard Event and never see the simulated keypress (which comes later in the Event hierarchy). And, best of all, if something goes wrong you can be left with "stuck" modifiers with your only way out a hard reset of your computer...

With all that said, this may get you somewhere. Change/delete the key down... and key up... lines to suit your needs and make sure the "USB device key" is the same for both the "pressed" and "released" triggers:

SD Hold Down Modifiers While Button Pressed.kmmacros (5.3 KB)