Drawback
- The Photographs app on macOS doesn’t present a keyboard shortcut for the Export Unmodified Authentic command.
- macOS permits you to add your individual app-specific keyboard shortcuts by way of System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts. You’ll want to enter the precise spelling of the menu merchandise you need to invoke.
- Photographs renames the command relying on what’s chosen: Export Unmodified Authentic For 1 Picture“ turns into ”… Authentics For two Videos” turns into “… For 3 Objects” (for blended picks), and so forth. Argh!
- The System Settings UI for assigning keyboard shortcuts is extraordinarily tedious to make use of if you wish to add multiple or two shortcuts.
Resolution: shell script
Right here’s a Bash script that assigns Ctrl + Decide + Cmd + E to Export Unmodified Originals for as much as 20 chosen gadgets:
#!/bin/bash
# Assigns a keyboard shortcut to the Export Unmodified Originals
# menu command in Photographs.app on macOS.
# @ = Command
# ^ = Management
# ~ = Possibility
# $ = Shift
shortcut='@~^e'
# Set shortcut for 1 chosen merchandise
echo "Setting shortcut for 1 merchandise"
defaults write com.apple.Photographs NSUserKeyEquivalents -dict-add "Export Unmodified Authentic For 1 Picture" "$shortcut"
defaults write com.apple.Photographs NSUserKeyEquivalents -dict-add "Export Unmodified Authentic For 1 Video" "$shortcut"
# Set shortcut for 2-20 chosen gadgets
objects=(Photographs Movies Objects)
for i in {2..20}
do
echo "Setting shortcut for $i gadgets"
for object in "${objects[@]}"
do
defaults write com.apple.Photographs NSUserKeyEquivalents -dict-add "Export Unmodified Originals For $i $object" "$shortcut"
executed
executed
# Use this command to confirm the end result:
# defaults learn com.apple.Photographs NSUserKeyEquivalents
The script is additionally obtainable on GitHub.
Utilization:
- Give up Photographs.app.
- Run the script. Be at liberty to vary the important thing combo or rely greater than 20.
- Open Photographs.app.
Be aware: There’s a bug in Photographs.app on macOS 13.2 (and at the very least some earlier variations). Customized keyboard shortcuts don’t work till you’ve opened the menu of the respective command at the very least as soon as. So it’s essential to manually open the File > Export as soon as earlier than the shortcut will work. (For Apple of us: FB11967573.)