Event.KEYEVENTS

1 view
Skip to first unread message

Sridhar Cheguri

unread,
Jul 30, 2009, 9:39:03 AM7/30/09
to Google Web Toolkit Applications
sinkEvents(Event.ONCONTEXTMENU | Event.MOUSEEVENTS | Event.KEYEVENTS);

public void onBrowserEvent(Event event) {
System.out.println("event "+event.getType());
if (DOM.eventGetType(event) == Event.ONCONTEXTMENU) {
// this works
} else if (DOM.eventGetType(event) == Event.ONKEYPRESS) {
// never get anything
} else {
super.onBrowserEvent(event); // get all the mouse events
}
}

I also tried sinking Event.ONKEYPRESS. same result.
Reply all
Reply to author
Forward
0 new messages