Add the function 'Respond to ESC Key'

Need testing.