This prevents the escape key from being treated as held down indefinitely when losing focus while holding the escape key.