4

I have broken the touch bar in my MacBook Pro 13". Only the ESC key keeps working.

Replacing the touch bar may be expensive so I'd like to know if it is possible to replace its functions with keyboard shortcuts.

The functions I am highly interested in are:

  • volume
  • screen backlight
  • keyboard backlight

4 Answers 4

2

Karabiner was created for this. It'll allow you to create a layer for your volume toggle and setting, brightness, play/pause, and everything else the function row or touch bar was able to provide - except, of course, the very custom programming some apps have the touch bar hew to.

I primarily use Karabiner for my volume:

a: volume -
s: volume +
d: mute toggle

2
+25

Some options from the command line ...

osxdaily -

Mute your Mac: This turns volume to 0, effectively muting the Mac speaker output: sudo osascript -e "set Volume 0" Maximum volume: This sets the volume to the highest it will go: sudo osascript -e "set Volume 10"

Another source for command line brightness

  • Reduce brightness - osascript -e 'tell application "System Events"' -e 'key code 144' -e ' end tell'
  • Increase brightness - osascript -e 'tell application "System Events"' -e 'key code 145' -e ' end tell'
1
  • Oh, I'm sorry you only got half the bounty - I'd intended to award you all of it. (There used to be a 'grace period' after the bounty ended in which it could still be awarded - I guess now there isn't for some reason, but there was no indication of this until it expired and you automatically only got half of it.)
    – N. Virgo
    Mar 18, 2021 at 14:03
1

No its not possible to assign volume, screen backlight and keyboard backlight functions to any other key on your Mac (at least not without the installation of a third party app).

However, you can still adjust the volume without having to go into Settings everytime by enabling the volume icon in the menu bar.

Head into System Preferences > Sound > Check the Show Volume in Menu bar option.

enter image description here

Unfortunately you can only add a menu bar icon for volume and there is no menu bar shortcut for Screen Backlight and Keyboard backlight.

1
  • This answer is not quite right: it is possible with third party software, e.g., Karabiner-Elements, (per Nick Calabro above) MacOS scripting (per Mr R above), or MacOS Automator to create keyboard-available Services.
    – Dave Land
    Sep 26, 2021 at 18:04
0

I know that this is an old question, but there is another way not yet covered: Use MacOS Automator to create Services "Sound Volume Up" and "Sound Volume Down" consisting of the following AppleScript:

on run
    set current_volume to output volume of (get volume settings)
    set volume output volume (current_volume + 10)
end run

(with current_volume - 10 for "Sound Volume Down", of course)

Then, in System Preferences > Keyboard > Shortcuts > Services, set whatever keyboard shortcut you want to use to increase or decrease the volume.

enter image description here

PS: If my keyboard shortcuts (Shift-Control-Option-Command-plus and Shift-Control-Option-Command-minus) seem absurd to you, it's because I have configured my Caps Lock key as a "hyper" key, which presses all those modifiers at once.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .