* @return a handle that may be used to remove this listener
*/
public static EventListenerRemover addKeyPressListener(final Object source,
JavaScriptObject nativeSource, final KeyPressListener listener) {
return Event.addEventListener(KeyPressEvent.NAME, nativeSource,
new EventListener() {
public void handleEvent(Event event) {
listener.onKeyPress(new KeyPressEvent(source, event));
}
});
}