Restore functionality of Escape key in Finder (Mavericks)
It's always been possible to remove focus from all selected files in Finder by pressing the ⎋ Escape key. It would appear that this is no longer possible in OS X Mavericks. I navigate the Finder entirely via keyboard and using ⎋ Escape is something I do quite frequently.
I've looked at nearly every preference pane I could think of as well as the contents of com.apple.finder.plist
, com.apple.systempreferences.plist
, and com.apple.universalaccess.plist
, but no luck so far (or I'm just not seeing it).
Any ideas?
Solution 1:
Right shortcut is: CmdOpt-A
In System Preferences > Keyboard > App Shortcut you can create your custom shortcut, only for Finder if you want (You must use at least combination of cmd or option or maiusc + another key).
Solution 2:
Download and install the free & excellent KeyRemap4MacBook software: https://pqrs.org/macosx/keyremap4macbook/
Open its main preference window then choose the Misc & Uninstall tab
Follow the steps described at
https://pqrs.org/macosx/keyremap4macbook/document.html.en#privatexml
using this snippet as the content for private.xml:
<?xml version="1.0"?>
<root>
<item>
<name>Finder: Escape to Deselect All (Cmd-Opt-D)</name>
<identifier>private.app_finder_escape_to_Deselect_All</identifier>
<only>FINDER</only>
<autogen>
__KeyToKey__
KeyCode::ESCAPE, ModifierFlag::NONE,
KeyCode::A, ModifierFlag::COMMAND_L | ModifierFlag::OPTION_L
</autogen>
</item>
</root>
After pressing the ReloadXML find the new mapping and turn it on, and enjoy.
PS. Don't forget to remove any custom keyboard shortcut from Finder's Deselect All…
from System Preferences/Keyboard/Shortcuts/App Shortcuts/Finder/Deselect All… if you tried solving this problem this way.
Solution 3:
Please check Keyboard Maestro… :)
Solution 4:
As a solution to this Problem I use the following AppleScript:
tell application "Finder"
if selection is [] then
tell application "System Events" to key code 36 using control down
else
set selection to []
end if
end tell
The script implements the following logic:
- If there is no file or folder selected in Finder then this script tries to escape from a possible rename operation if there is one (beeps if there is none).
- If there are files or folders selected in Finder then this script deselects them.
I use FastScripts from Red Sweater Software to remap the escape key in Finder to this script. FastScripts installs a script menu in the menubar and is free for use with up to 10 scripts.
With both parts together the behaviour of the escape key is similar to the escape key behaviour in older macOS versions.