Wednesday, February 7, 2018

Is Document.get().createKeyPressEvent() not available in IE11?

Is there any way for a GWT app to use createKeyPressEvent (or equivalent) in IE11? I just isolated an odd browser console error message to

  private native NativeEvent createKeyEventImpl(Document doc, String type,

      boolean canBubble, boolean cancelable, boolean ctrlKey, boolean altKey,

      boolean shiftKey, boolean metaKey, int keyCode, int charCode) /*-{

    var evt = doc.createEvent('KeyboardEvent');

    if (evt.initKeyEvent) {

      // Gecko

      evt.initKeyEvent(type, canBubble, cancelable, null, ctrlKey, altKey,

        shiftKey, metaKey, keyCode, charCode);

    } else {

      // This happens to be IE11+ as of today

      if ($wnd.console) {

        $wnd.console.error("Synthetic keyboard events are not supported in this browser");



    return evt;


You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment