Adds support for the escape key using the keydown event