Keyboard shortcut for "Show Package Contents"
Solution 1:
I suggest that you create a custom Finder shortcut in System Preferences → Keyboard → Shortcuts → App Shortcuts → +.
This way you can open packages with ⌥ as a modifier key.
- ⌘+O to open folders
- ⌥+⌘+O to open packages
Solution 2:
If you want a single keystroke to open regular items and regular folders, but show package contents for packages (including Applications), you can turn to Automator.
Create a new Service in Automator.
The service receives files or folders in Finder.app.
The first action is Run AppleScript. Here is the script:
on run {input, parameters}
set my_output to {}
repeat with oneItem in input
if package folder of (info for oneItem as alias) then
try
tell application "Finder" to open folder ((oneItem as text) & "Contents")
end try
else
set my_output to my_output & oneItem
end if
end repeat
if ((count my_output) is 0) then
error number -128
end if
return my_output
end run
The second action is Open Finder Items
Save your service. I called mine BetterOpen
.
Then, go to System Preferences » Keyboard » Keyboard Shortcuts » Services and assign a keystroke to the service. Unfortunately, I have not found a way to reclaim shortcuts already claimed by the Finder, so you may have to pick a keystroke other than ⌘O.
If you want to open the package in the same window, replace the line
tell application "Finder" to open folder ((oneItem as text) & "Contents")
with
tell application "Finder" to set target of window 1 to ((oneItem as text) & "Contents")