Contribute
Register

Sleep Shutdown Eject Keyboard Shortcuts

Joined
Jul 24, 2015
Messages
2,332
Motherboard
MSI H81i
CPU
i5-4570
Graphics
RX 580
Real macs can be put to sleep or shut down with their keyboards

Option + Command + Eject


Go to sleep

Control + Option + Command + Eject

Shut Down

Small hack emulating this behaviour with macOS Services

Attached to this post are 2 scripts. Open/edit the 'Power Off' script in automator and provide your password. For example if your password was "tonymacx86" you would edit the line

Code:
set pass to "password" as string
to read

Code:
set pass to "tonymacx86" as string
Now the scripts can be installed to ~/Library/Services and keyboard shortcuts of your choosing assigned!

Eject and close the optical drive tray

See post #5
 

Attachments

Last edited:
Joined
May 25, 2010
Messages
29
Motherboard
ML/Mav with shutdown/wake-up issue
CPU
i7-4770
Graphics
Intel4600 on ga-z87m-d3h
Mac
MacBook Air, MacBook Pro, Mac mini
Classic Mac
Mobile Phone
iOS
Hi, vulgo
Thanks for these very useful scripts.
And I have a request. Could you make a script to open/close cd tray?
Thanks in advance.
 
Joined
Jul 24, 2015
Messages
2,332
Motherboard
MSI H81i
CPU
i5-4570
Graphics
RX 580
Hi, vulgo
Thanks for these very useful scripts.
And I have a request. Could you make a script to open/close cd tray?
Thanks in advance.
Glad you find them useful. I don't have an optical drive for testing, but this macrumors thread seems to have a solution for CD tray automation. See attached archive containing the commands as services.

Credits for usage of drutil command: tjwett over on macrumors forums
 
Last edited:
Joined
May 25, 2010
Messages
29
Motherboard
ML/Mav with shutdown/wake-up issue
CPU
i7-4770
Graphics
Intel4600 on ga-z87m-d3h
Mac
MacBook Air, MacBook Pro, Mac mini
Classic Mac
Mobile Phone
iOS
Thank you for this, vulgo.
drutil command works good on terminal app. but unfortunately i have failed to add your workflow as a service. I will try it again later. Thank you.
 
Joined
Jul 24, 2015
Messages
2,332
Motherboard
MSI H81i
CPU
i5-4570
Graphics
RX 580
Thank you for this, vulgo.
drutil command works good on terminal app. but unfortunately i have failed to add your workflow as a service. I will try it again later. Thank you.
My fault i hadn't set the workflow input parameter to none. Uninstall the existing files from ~/Library/Services if they are there and try these ones attached.
 

Attachments

Joined
May 25, 2010
Messages
29
Motherboard
ML/Mav with shutdown/wake-up issue
CPU
i7-4770
Graphics
Intel4600 on ga-z87m-d3h
Mac
MacBook Air, MacBook Pro, Mac mini
Classic Mac
Mobile Phone
iOS
Works great! Thank you vulgo! Very useful for the hackintosh world.
 
Top