Search in sources :

Example 21 with KeyboardEvent

use of elemental2.dom.KeyboardEvent in project kie-wb-common by kiegroup.

the class ListSelectorViewImpl method isEscape.

boolean isEscape(final Event event) {
    final KeyboardEvent keyboardEvent = asElemental2Event(event);
    final boolean isEscape = keyboardEvent.key.equals("Esc");
    /* IE/Edge specific value */
    final boolean isEsc = keyboardEvent.key.equals("Escape");
    return isEscape || isEsc;
}
Also used : KeyboardEvent(elemental2.dom.KeyboardEvent)

Aggregations

KeyboardEvent (elemental2.dom.KeyboardEvent)21 Test (org.junit.Test)16 Event (org.jboss.errai.common.client.dom.Event)2 Button (org.jboss.errai.common.client.dom.Button)1