I found this code, and made it part of a master ahk script, but it can work on its own. It uses Alt+N to show or hide the left navigation panel in folder windows.
#IfWinactive ahk_class CabinetWClass
PS: You can use Alt+P to do the same with the preview pane, but that one doesn't need ahk. It's built in.