I am able to get context menu and mouse events but not key events from
gwt canvas. anyone know why?

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.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to