Add API for enabling/disabling input to support vim-mode's insert mode