Correct key code to put computer to sleep?


(Shriramana Sharma) #1

I see both Consumer_Sleep under key_defs_consumerctl.h and System_Sleep under key_defs_sysctl.h. Which is the correct keycode to use to put my system to sleep? Why are there two anyway?


(Gergely Nagy) #2

As far as I remember, it is System_Sleep. The difference is that System_Sleep is a system-wide sleep, Consumer_Sleep is supposed to initiate “low power state on application-specific device”. I admit I have no idea what that actually means.


(Tom Armstrong) #3

For locking (…not necessarily sleeping) my macbook, I’ve bound the desired key to F14, and then bound that elsewhere as a shortcut for locking the screen.