Add exitInsertModeAndPassKey to help address #1176