Example usage for com.google.gwt.event.dom.client KeyDownHandler onKeyDown

List of usage examples for com.google.gwt.event.dom.client KeyDownHandler onKeyDown

Introduction

In this page you can find the example usage for com.google.gwt.event.dom.client KeyDownHandler onKeyDown.

Prototype

void onKeyDown(KeyDownEvent event);

Source Link

Document

Called when KeyDownEvent is fired.

Usage

From source file:gwt.material.design.components.client.base.widget.MaterialWidget.java

License:Apache License

@Override
public HandlerRegistration addKeyDownHandler(KeyDownHandler handler) {
    return addDomHandler(event -> {
        if (isEnabled())
            handler.onKeyDown(event);
    }, KeyDownEvent.getType());/*from  w w w  .  ja  v  a 2s .c o m*/
}

From source file:org.rstudio.core.client.widget.SearchWidget.java

License:Open Source License

public HandlerRegistration addKeyDownHandler(final KeyDownHandler handler) {
    return suggestBox_.addKeyDownHandler(new KeyDownHandler() {
        public void onKeyDown(KeyDownEvent event) {
            handler.onKeyDown(event);
        }/*w w w .j  a  v a  2 s.c  o  m*/
    });
}