Edit this page

up.event up.event.onEscape(listener)
JavaScript function

This feature is experimental. It may be changed or removed in a future version.

Registers an event listener to be called when the user presses the Escape key.

Example

up.event.onEscape(function(event) {
  console.log('Escape pressed!')
})

@function


Parameters

listener Function(Event)

The listener function that will be called when Escape is pressed.