Downside
- The Pictures app on macOS doesn’t present a keyboard shortcut for the Export Unmodified Unique command.
- macOS permits you to add your individual app-specific keyboard shortcuts through System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts. It’s worthwhile to enter the precise spelling of the menu merchandise you wish to invoke.
- Pictures renames the command relying on what’s chosen: Export Unmodified Unique For 1 Photograph“ turns into ”… Uniques For two Videos” turns into “… For 3 Gadgets” (for blended alternatives), and so forth. Argh!
- The System Settings UI for assigning keyboard shortcuts is extraordinarily tedious to make use of if you wish to add a couple of or two shortcuts.
Answer: shell script
Right here’s a Bash script that assigns Ctrl + Choose + Cmd + E to Export Unmodified Originals for as much as 20 chosen objects:
#!/bin/bash
# Assigns a keyboard shortcut to the Export Unmodified Originals
# menu command in Pictures.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.Pictures NSUserKeyEquivalents -dict-add "Export Unmodified Unique For 1 Photograph" "$shortcut"
defaults write com.apple.Pictures NSUserKeyEquivalents -dict-add "Export Unmodified Unique For 1 Video" "$shortcut"
# Set shortcut for 2-20 chosen objects
objects=(Pictures Movies Gadgets)
for i in {2..20}
do
echo "Setting shortcut for $i objects"
for object in "${objects[@]}"
do
defaults write com.apple.Pictures NSUserKeyEquivalents -dict-add "Export Unmodified Originals For $i $object" "$shortcut"
finished
finished
# Use this command to confirm the consequence:
# defaults learn com.apple.Pictures NSUserKeyEquivalents
The script is additionally out there on GitHub.
Utilization:
- Give up Pictures.app.
- Run the script. Be happy to alter the important thing combo or rely larger than 20.
- Open Pictures.app.
Be aware: There’s a bug in Pictures.app on macOS 13.2 (and not less than some earlier variations). Customized keyboard shortcuts don’t work till you’ve opened the menu of the respective command not less than 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.)