Move special handling of Esc into events.coffee