Language: Java/GWT Platform: Ubuntu/Firefox
I need to listen for arrow keys pressed in a TextBox. It seems that pressing up and down does not generate keypressevents for some reason. Instead I tried giving focus to a focus panel, handling the arrow keys and passing any other events to the TextBox, but the delegation has no effect. I've tried:
ChangeEvent.fireNativeEvent(focusPanelEvent.getNativeEvent(), textBox);
and
textBox.fireEvent(focusPanelEvent);
and
private class DelegatingFocusPanel extends FocusPanel {
public void delegate(Widget target, GwtEvent event) {
super.delegateEvent(target, event);
}
}
public void onKeyPress(KeyPressEvent event) {
focusPanel.delegate(textBox, event);
}
Any other ideas?