Closing the Macbook Lid => Switch off Display, but NOT put Mac to Sleep

How can I use Macbook lid closure as a trigger to Switch off Display (Command+Control+Q or by other means) but NOT put Mac to Sleep?

caffeinate -s in Terminal or via an "Execute Shell Script" action will stop your Mac sleeping when you close the lid as long as it is connected to AC power. That last bit may be important, depending on your use case.

1 Like

This may have a useful tip or two:

I do know how to prevent it from sleeping.

But I want to switch off the screen when I close the lid, without making computer going to sleep - when on battery.

So what I am looking for is the trigger to use in KBM that will recognize lid closed/opened.

There isn't one...

Thank you.

^ ⇧-Eject will turn off the screen.