Push/Pop stack for input modes, and some key binding improvements.