Bind Tab -> Esc, and Esc -> Tab everywhere.