| // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| part of $LIBRARYNAME; |
| |
| |
| $(ANNOTATIONS)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { |
| |
| factory $CLASSNAME(String type, |
| {Window view, bool canBubble: true, bool cancelable: true, |
| String keyIdentifier: "", int keyLocation: 1, bool ctrlKey: false, |
| bool altKey: false, bool shiftKey: false, bool metaKey: false, |
| bool altGraphKey: false}) { |
| if (view == null) { |
| view = window; |
| } |
| final e = document.$dom_createEvent("KeyboardEvent"); |
| e.$dom_initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, |
| keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey); |
| return e; |
| } |
| |
| @DomName('KeyboardEvent.keyCode') |
| int get keyCode => $dom_keyCode; |
| |
| @DomName('KeyboardEvent.charCode') |
| int get charCode => $dom_charCode; |
| $!MEMBERS |
| } |