"Fixing" annoying behaviour of the Alt key in Photoshop

Sun Jul 01 2012 22:24:00 GMT+0000 (Coordinated Universal Time)

Something that has been bugging me for a while now is how the Alt key behaves in Photoshop (CS5), or rather the behaviour of the Alt key in Windows programs in general. When you press the Alt key in a Windows program with a menu bar, the menu bar is highlighted for navigation using the arrowkeys or letter shortcuts. This becomes a problem in Photoshop though, where lots of keyboard shortcuts involve just pressing or holding the Alt key.

For example when zooming using Alt+Mousewheel or holding Alt to activate an alternate feature of the current tool you’re using, the menu bar is highlighted. Then when you press another key, either to select another tool or pressing Alt again, either a menu option is chosen or you hear a “beep” and nothing happens.

Earlier versions of Photoshop didn’t have this issue, but for whatever reason CS5 does. To fix this, I threw together an AutoHotkey script that makes it somewhat less annoying:

; Fix alt key behaviour in photoshop
#IfWinActive ahk_class Photoshop
    Alt::
        Send {Alt}
    return
#IfWinActive

Whenever you release the Alt key inside Photoshop, it will send an another Alt keystroke, which will deselect the menu bar instantly.

Who?
What?
My personal portfolio of things I come up with when I'm bored.