switching to ex mode should no longer depend on the order of on_text and on_key_press