How can I increase brightness on Mac without Mac keyboard
I’m using a MacBook Pro and I broke it a while back. So, the keyboard doesn’t work on the laptop. I hooked up a keyboard to the USB port so I can still use it. I’m using a Dell keyboard.
Last night I wanted to listen to music without the brightness of the screen. So without thinking I turned the brightness off. Now I can't get the screen back so I was wondering if there's a way I can use the Dell keyboard to get the screen brightness back?
key: "scroll lock" to decrease brightness
key: "pause" to increase brightness
You can also use Apple Script - if you can ssh into your mac, you can then, in the ssh session, type the following:
osascript -e 'tell application "System Events"
key code 113
end tell'
Please note, that you actually need to press Enter at the end of each line. Also, be careful with the quote characters - there's a single quote after the -e
option, and then a closing single quote at the end of line 3 above (following the end tell
). Each execution of the script will increase the brightness by one notch. If you want it dimmer, change 113
to 107
.
If this is something you see yourself use more often, then it might be worth it to either define an alias or write a small shell script, eg:
MacBook:~😈 alias brightup="osascript -e 'tell application \"System Events\"
> key code 113
> end tell'"
and:
MacBook:~😈 alias brightdn="osascript -e 'tell application \"System Events\"
> key code 107
> end tell'"
Again, be careful with the quotes. When you put the above aliases into your .bashrc
, all you'll need to type is brightup
or brightdn
.
Additional info
If you can't ssh into your box, you can blindly type the first osascript
command. I would do it in the following way:
- press CommandSpace
- type
terminal
and press Enter - blindly and slowly (and carefully) type the first
osascript...
command from the example above, exactly as it is there. This should bump the brightness up a bit, enough so that you should see what you're doing. If not, try a couple of times to press Up ArrowEnter
You could try resetting the NVRAM (a.k.a. PRAM). Shut down your Mac, then when you turn it back on, holding down commandoptionPR (windowsaltPR on a PC keyboard) until the computer restarts again.
The NVRAM typically stores hardware settings like brightness, volume, etc.