Minor refactoring. Do not handle ESC key.