Turn display off and leave MacBook Pro running I run some iMacro scripts through Firefox every so often on my MacBook Pro and I like to turn my display off while they're running. I've been accomplishing this for the past year with the following setup:


System Preferences > Energy Saver > Computer Sleep &amp; Display
Sleep are both set to Never
Unchecked Put the hard disks to sleep when possible.
Set a Hot Corner to Put Display to sleep


The issue is this has recently stopped working. When I put my cursor in my Hot Corner to turn my display off the display turns off but it also now stops my iMacro scripts from running. I'm not sure if the computer is actually going to sleep though as the display wakes up quickly with any interaction.

Since this has stopped working I've been turning my brightness all the way down until the display turns off to run my scripts. The issue with this approach though is that the keyboard stays illuminated.

How can I turn off my display and keyboard illumination, while at the same time leaving my MacBook Pro running to execute my iMacro scripts?
To answer your question, "How can I turn off my display and keyboard illumination, while at the same time leaving my MacBook Pro running to execute my iMacro scripts?", one way is to use the Function Keys.

To change the Display brightness use F1 and or F2 respectively to decrease and increase brightness.

To change the backlit Keyboard brightness use F5 and or F6 respectively to decrease and increase brightness.

Note that if under System Preferences > Keyboard > Keyboard you have the "Use all F1. F2, etc. keys as standard function keys" check box checked then you'll need to also press the Fn key along with the wanted Function key to use the special features printed on the keys.

See Portables: Adjusting the keyboard backlight and OS X El Capitan: Adjust your display’s brightness for additional information and note that although the later document if for OS X El Capitan the brightness function keys for portable Macs are the same in earlier versions.  You can Google "OS X Adjust your display’s brightness" for other versions, e.g.: OS X Yosemite: Adjust your display’s brightness