# Keyboard shortcuts for Export Unmodified Original in Photos for Mac

DevFeed: [Keyboard shortcuts for Export Unmodified Original in Photos for Mac](<https://devfeed.tech/articles/keyboard-shortcuts-for-export-unmodified-original-in-photos-for-mac-21721.md>)

Original publisher: [Read original article](<https://oleb.net/2023/photos-keyboard-shortcuts/>)

Author: Ole Begemann

Published: 2023-03-21T21:42:04Z

Content type: tutorial

Language: en

Sources: [Ole Begemann](<https://devfeed.tech/sources/ole-begemann.md>)

Topics: [macOS](<https://devfeed.tech/topics/macos.md>), [Scripting, bash](<https://devfeed.tech/topics/scripting-bash.md>), [Script](<https://devfeed.tech/topics/script.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [commands](<https://devfeed.tech/tags/commands.md>), [keyboard](<https://devfeed.tech/tags/keyboard.md>), [mac](<https://devfeed.tech/tags/mac.md>), [script](<https://devfeed.tech/tags/script.md>), [shortcuts](<https://devfeed.tech/tags/shortcuts.md>)

## AI overview

This tutorial explains how to assign a keyboard shortcut to Photos.app's Export Unmodified Original command on macOS. It provides a Bash script that configures the shortcut for selections of up to 20 photos, videos, or mixed items, and notes a macOS 13.2 bug requiring the relevant menu to be opened once first.

## Source excerpt

Problem The Photos app on macOS doesn't provide a keyboard shortcut for the Export Unmodified Original command. macOS allows you to add your own app-specific keyboard shortcuts via System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts. You need to enter the exact spelling of the menu item you want to invoke. Photos renames the command depending on what's selected: Export Unmodified Original For 1 Photo" turns into "... Originals For 2 Videos" turns into "... For 3 Items" (for mixed selections), and so on. Argh! The System Settings UI for assigning keyboard shortcuts is extremely tedious to use if you want to add more than one or two shortcuts. Dynamically renaming menu commands is cute, but it becomes a problem when you want to assign keyboard shortcuts. Solution: shell script Here's a Bash script1 that assigns Ctrl + Opt + Cmd + E to Export Unmodified Originals for up to 20 selected items: #!/bin/bash # Assigns a keyboard shortcut to the Export Unmodified Originals # menu command in Photos.app on macOS. # @ = Command # ^ = Control # ~ = Option # $ = Shift shortcut='@~^e' # Set shortcut for 1 selected item echo "Setting shortcut for 1 item" defaults write com.apple.Photos NSUserKeyEquivalents -dict-add "Export Unmodified Original For 1 Photo" "$shortcut" defaults write com.apple.Photos NSUserKeyEquivalents -dict-add "Export Unmodified Original For 1 Video" "$shortcut" # Set shortcut for 2-20 selected items objects=(Photos Videos Items) for i in {2..20} do echo "Setting shortcut for $i items" for object in "${objects[@]}" do defaults write com.apple.Photos NSUserKeyEquivalents -dict-add "Export Unmodified Originals For $i $object" "$shortcut" done done # Use this command to verify the result: # defaults read com.apple.Photos NSUserKeyEquivalents The script is also available on GitHub. Usage: Quit Photos.app. Run the script. Feel free to change the key combo or count higher than 20. Open Photos.app. Note: There's a bug in Photos.app on macOS 13.2 (and at least s