Creating an Elgato Stream Deck Sleep Button in macOS

Published by Christian Mohn · Read in about 3 min (497 words)

I recently got an Elgato Stream Deck for the home office, and I’ve set it up mostly to control OBS Studio for a couple of projects I’m working on. Since I also have a couple of Key Light Airs, I also use it to control them.

While setting it up, I figured I needed a sleep button on it, that basically locks my Macbook and turns off the lights in one fell swoop. Conceptually this seemed like an very easy thing to set up, but it turns out there are some macOS quirks that needs to be addressed for this to work.

By default in macOS High Sierra, or newer, there is a predefined lock screen hotkey: Command ⌘ + Control ⌃ Q which works very well. In fact, it works a little to well as it turns out. The problem was, that when I tried to enter Command ⌘ + Control ⌃ Q as the hotkey combination in my button settings in the Stream Deck configuration, the screen locked. Naturally. And Stream Deck never recorded the hotkey, since it automatically locked the MacBook.

Luckily, there was a somewhat convoluted but at the same time pretty easy fix for this.

Creating a Lock/Sleep button for Stream Deck #

  1. Assign a temporary lock hotkey

    You will first need to temporarily assign a new hotkey for the lock screen, in order to ensure that macOS doesn’t lock the screen when hitting the original hotkey to record it in Stream Deck.

    To do this navigate to System Preferences -> Keyboard -> App Shortcuts.

    Counterintuitively select to add a new hotkey by clicking the + sign

    Under Menu Title, enter Lock Screen This is important, as it needs to match the existing menu item.

    Then under Keyboard Shortcut, enter a new key combination that you can assign temporarily.

    In this example I used Command ⌘ + Control ⌃ L, but it can be anything. Then click on add

  2. Create a Multi Action button in Stream Deck

    Add a System -> Hotkey to the Multi Action button, and assign it the Command ⌘ + Control ⌃ Q hotkey.

    This time macOS won’t lock up, since the the hotkey for locking as been temporarily changed to whatever you chose in step 1.

    In my case, I also added a Stream Deck -> Control Center: On / Off button as well, as I wanted to make sure my Key Lights got turned off at the same time. Close the Stream Deck app.

  3. Go back to System Preferences -> Keyboard -> App Shortcuts and delete the temporary Lock Screen definition, to restore the original Command ⌘ + Control ⌃ Q hotkey to macOS and profit! Now your new Stream Deck Sleep/Lock button should work, in addition to the original macOS hotkey assignment.

A bit counter intuitive at first glance, but it makes sense that the hotkey for locking the screen needs to be disabled to be able to record it into the Stream Deck App.

Post last updated on January 2, 2024: Add author

About

vNinja.net is the digital home of Christian Mohn and Stine Elise Larsen.

The primary focus is on IT architecture and data center technologies like virtualization and related topics, but other content also pops up from time to time.

Sponsors