Using a game pad as a cheap Stream Deck

This week I decided to purchase a cheap Logitech game controller to test out some games that require controllers (and to see if I like games that require controllers. Spoiler: I don't.) One of the first things I did was test it to see if Keyboard Maestro can detect its buttons using the USB Device Key trigger. If you make sure that the switch under the controller is set to D ("DirectInput") instead of X ("XInput") it will work.

  • 12 of the 18 buttons work perfectly
  • 2 buttons (Mode & Home/Logitech) are local to the controller, and cannot be detected by design, by any app
  • 4 buttons, called the D-Pad, are designed to be polled rather than used as triggers. I believe there are a few free open-source apps that can convert these analog inputs to triggers, but they will implement that through polling. It may also be possible to poll their values directly in KM using python or Swift, but I don't think that would be efficient, because you would have to start up a fresh environment for each poll, so it's probably better to get an open-source app.

In the meantime, you can use this controller (and probably any controller) as a cheap version of a Stream Deck. Therefore, I will upload a starter template of macros (below) to help people start out on this path.

Analog Stick L3 Macro (v11.0.4)

Analog Stick L3.kmmacros (2.8 KB)

1 Like

I used to do this until MacOS stopped working with the game controllers I had. That really irked me.

Ultimately, I bought Streamdeck Mobile and use an iPad for touch-activation of a lot of KM macros–especially when I’m editing audio and video, and for arranging windows onscreen with the Magnet-Based Window Movers & Sizers .

@noisneil’s KMDeck is really cool alternative to consider.

1 Like