Tuesday, May 1, 2012

How to Fix Photoshop Breaking the Escape Key in Windows

Does Photoshop annoy you by breaking the escape key in other programs?  Here’s an AutoHotkey script that will let you run Photoshop and still use the escape key as usual in other programs.
If you’re a keyboard geek and you use Photoshop, you’ve likely been annoyed that the escape key doesn’t work in other applications while Photoshop is running.  It’s one of those tiny things that can drive you insane, so The Geek hacked together a solution for you.  You could always press Shift+esc to get the traditional escape key behavior in other applications, but he decided to make your life simpler through the power of AutoHotkey.
Make Photoshop Behave
If you’d like to fix this annoying behavior, download the zip file below and run fix_esc_photoshop.ahk in AutoHotkey.  Or, if you’d rather add the code to your own AutoHotkey script file, here’s the source code you need:
~Esc::
{
   IfWinExist, ahk_class Photoshop
   {
     IfWinActive ahk_class Photoshop
   {
     Send {ESC}
   } else {
     Send +{ESC}
   }
}else {
   Send {ESC}
}
return
}
Fix Photoshop Elements, Too
Photoshop Elements breaks the escape key just the same, but despite the similarities in the programs you’ll need a different script to fix it since PS Elements is identified as pseeditor instead of Photoshop.  You can just run fix_esc_photoshop_elements.ahk from the zip file, or insert the code below in your own AutoHotkey script file.  As you might notice, the pseeditor is the only difference between the two scripts:
~Esc::
{
   IfWinExist, ahk_class pseeditor
   {
      IfWinActive ahk_class pseeditor
   {
     Send {ESC}
   } else {
     Send +{ESC}
   }
}else {
   Send {ESC}
}
return
}
Just Run It
But hey, if you’re not an AutoHotkey user, don’t despair.  We’ve made an executable version that you can run on any Windows computer, whether or not you have AutoHotkey installed.  Download the zip file, and run the Photoshop or Photoshop Elements exe, depending on what you use.
image
There’s no UI for this simple application, so if you want to exit the application you’ll need to open the task manager, find the application you’ve run (fix_esc_photoshop.exe or fix_esc_photoshop_elements.exe) and kill it.
Geek trick: In Windows 7 or Vista, press Ctrl+Shift+Esc to open the task manager directly.

Or, if you’d like to have this program run automatically when you boot your computer, create a shortcut to the file and paste it in your startup folder.  You can quickly open the startup folder by entering the following into the address bar in Explorer:
shell:startup

No comments:

Post a Comment