KeyboardEvent(String type, { Window view, bool canBubble: true, bool cancelable: true, int keyLocation: 1, bool ctrlKey: false, bool altKey: false, bool shiftKey: false, bool metaKey: false })

Source

factory KeyboardEvent(String type,
    {Window view, bool canBubble: true, bool cancelable: true,
    int keyLocation: 1, bool ctrlKey: false,
    bool altKey: false, bool shiftKey: false, bool metaKey: false}) {
  if (view == null) {
    view = window;
  }
  final e = document._createEvent("KeyboardEvent");
  e._initKeyboardEvent(type, canBubble, cancelable, view, "",
      keyLocation, ctrlKey, altKey, shiftKey, metaKey);
  return e;
}