Contribute
Register

Sleep Shutdown Eject Keyboard Shortcuts

Status
Not open for further replies.
Joined
Jul 24, 2015
Messages
2,191
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

  • Services.zip
    65 KB · Views: 317
Last edited:
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.
 
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:
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.
 
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

  • CD Tray Services.zip
    66.6 KB · Views: 211
Works great! Thank you vulgo! Very useful for the hackintosh world.
 
Status
Not open for further replies.
Back
Top