SEARCH

How-To Geek

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.

image

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

image

Conclusion

AutoHotkey is a handy tool to make your computer work like you want, and this simple script can save you lots of frustration if you keep Photoshop running on your computer often. 

Link

Download the AutoHotkey Files and Exe to keep Photoshop from breaking the escape key

Matthew digs up tasty bytes about Windows, Virtualization, and the cloud, and serves them up for all to enjoy!

  • Published 06/24/10

Comments (15)

  1. Tarek

    My ESC key decided it didn’t like being the ESC key anymore so it decided to swap functions with the WIN key. When I googled “windows 7 escape key is now windows key” this was the 2nd result. The google result shows the geek top of Ctrl+Shift+ESC so I tried it and things wend back to normal. I originally came on this page to leave a thank you, but decided to read the article anyway. I was amused to find that the Geek tip was unrelated to the problem described (although it fixed my problem).

    Anyhow, thanks.

  2. 1fastbullet

    Wait a minute.
    If you can afford to run Photoshop on your computer, shouldn’t you also be able to afford a dedicated computer to run it on? I

  3. Spencer

    Awesome thank’s so much. This is exactly what I was looking for :) I love howtogeek.com.

  4. Xantios Krugor

    I’ve seen the script,and although i’m willing to believe it works im more on the AutoIT side of life.
    so i have written your code in AutoIt,Still,Thanks for the info cause i didnt know why my escape key was “broken” (i have photoshop running 80% of my time i guess)

    [code]
    ; -- Code by Xantios Krugor ( h2g@xantioshosting.nl )
    HotKeySet("{ESC}","EscFix")

    while 1
    sleep(10)
    WEnd

    func EscFix()
    ; if Photoshop is running
    if ProcessExists("Photoshop.exe") then
    ConsoleWrite("Touched! ")
    HotKeySet("{ESC}","")
    send("!{esc}")
    HotKeySet("{esc}","EscFix")
    Else
    ;if photoshop inst running
    ConsoleWrite("No")
    return -1
    EndIf
    endfunc
    [/code]

  5. Matthew Guay

    @Xantios Krugor – Thanks for sharing … very cool. I really need to give AutoIT a shot sometime….

  6. Matthew Taylor

    Wow – I was assuming that the key was malfunctioning on my computer – I couldn’t work out why it seemed to stop working most of the time & then occasionally worked.
    Its particularly annoying, as I use AutoCAD a lot & you need to use escape fairly often to cancel commands on it.

  7. Cory H

    Thank you so much! Navigating back between Photoshop to Autocad used to mean I always had to close Photoshop to get anything done! Not anymore. Take that Adobe!

  8. Mikey

    The problem also seems to exist with Indesign…. Do you also some fix for that? The Photoshop fix worked like a charm!

  9. SDD

    Great!
    Thank you so much!!!
    It realy works now!
    I am happy again!

  10. Johan

    Hi everyone,

    (First, I apologize for my english, it is not my native language…)

    Thanx for this AHK script but…….. it doesn’t work for me! And with NO errors…

    I run Win7 Pro 64 bits ed. with Photoshop CS3 and both 32 bits and 64 bits compilation of this script (even you own executable) doesn’t work!! Esc key is still “locked” by Photoshop.

    I wanted to use AutoIt but I can’t download it from the official website: connexion is always reset by server! So, no more luck by this side…

    No other luck when I finally found an old release of AutoIt (3.2.10) and when the compiled script made from the above code answers me “AutoIt Error, Line -1: Error: Unknown function name.”

    ———————————

    BUT, after some investigations about AHK scripting, I found that Shift-Esc doesn’t work for me but Win-Esc DOES!!! So I changed Send +{ESC} to Send #{ESC} and my ESK key IS BACK… Great :’-)))

    So, here is a new version of this script that works for both Photoshop and InDesign:


    #NoTrayIcon
    ; This script keeps the ESC key avilable for other programs to use when Photoshop or InDesign is running.
    ; ~Lowell Heddings, http://howtogeek.com/
    ; Modded by Johan, http://www.nicolasullern.net/

    ~Esc::
    {
    if WinExist("ahk_class Photoshop") or WinExist("ahk_class indesign")
    {
    if WinActive("ahk_class Photoshop") or WinActive("ahk_class indesign")
    {
    Send {ESC} ; send the regular ESC
    } else {
    Send #{ESC} ; send the WIN+ESC sequence (sometimes Shift+ESC doesn't operate)
    }
    }else {
    Send {ESC}
    }
    return
    }

    Another variant, including Photoshop, InDesign and Photoshop Elements, with the use of an array (requires AutoHotkey_L):


    #NoTrayIcon
    ; This script keeps the ESC key avilable for other programs to use when Photoshop or InDesign is running.
    ; ~Lowell Heddings, http://howtogeek.com/
    ; Modded by Johan, http://www.nicolasullern.net/
    ; /!\ This script runs with AutoHotkey_L /!\
    ; Not tested with AutoHotkey Basic.

    ~Esc::
    {
    array := ["Photoshop", "indesign", "pseeditor"] ; array that contains all desired ahk_class names (/!\ runs with AutoHotkey_L /!\)
    loop % array.MaxIndex() ; loop to check all spotted apps
    {
    Var := "ahk_class " . array[A_Index]
    if WinExist(Var)
    {
    if WinActive(Var)
    {
    Send {ESC} ; send the regular ESC
    return
    } else {
    Send #{ESC} ; send the WIN+ESC sequence (sometimes Shift+ESC doesn't operate)
    }
    }else {
    Send {ESC}
    }
    }
    return
    }

    First I wanted to use a RegExp as I probably would do with PHP but I did not find how to do it correctly and simply and the use of an array and a loop seems to do the job…

    Regards,
    Johan

  11. Leeq

    Thanks a lot for this useful information!
    This was a great gift for a geek like me.. This really improved my mental health. Cheers.

  12. Steffen

    Thanks a lot! After the problem didn’t go away with the new keyboard, I googled for “Escape key windows 7″ and came across this website. Guess I can give a keyboard back to the IT. Had no idea that Photoshop (CS2 aka 9.0.2) was involved in this mess, just wondered that sometimes it worked and sometimes it didn’t. Thank you thank you thank you (deep bow).

  13. Jason Doucette

    I tried your .exe, and it works. But there’s a few issues:

    1. the ESC key within Photoshop still doesn’t work. I cannot cancel a dialog with ESC.
    2. a game in the XNA framework no longer has access to ESC with your program, even with Photoshop shut down. It makes an ESC key press act like CTRL or ALT (it shoots in my game, instead of quitting)

    This is unbelievable that Photoshop disables ESC. I use ESC almost as often as I use Enter…

    Is there a way to fix these issues?
    Thanks!!!

    Jason

  14. G

    Thank you thank you thank you man, I’ve been fighting against this issue for so long. Never thought it was photoshop!!!

  15. Aaron Hightower

    This should be a major embarassment for Adobe to cause other application to not function properly while Photoshop is running. I’m sure someone from Adobe has seen this thread, and if you are embarassed for your company I applaud you.

    That being said, if you are an application programmer, you still receive the key up event from the escape key in the windows message queue. I modified my application to be able to work by keying off of this key up event still being present .. so that when I receive a key up event WITHOUT a corresponding key down event, I simulate the key down event that is missing.

    Again, this is the kind of thing that companies should be more conscious about and be more responsible for. This is not a new issue, and Adobe should issue a way to patch this specific issue as it is most definitely the fault of Adobe and/or photoshop.

Enter Your Email Here to Get Access for Free:

Go check your email!