More consistent behavior for escape key.