Fix check for escape key on user interaction