OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 part of $LIBRARYNAME; | 4 part of $LIBRARYNAME; |
5 | 5 |
6 | 6 |
7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
{ | 7 $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS
{ |
8 | 8 |
9 factory $CLASSNAME(String type, | 9 factory $CLASSNAME(String type, |
10 {Window view, bool canBubble: true, bool cancelable: true, | 10 {Window view, bool canBubble: true, bool cancelable: true, |
11 int keyLocation: 1, bool ctrlKey: false, | 11 int keyLocation: 1, bool ctrlKey: false, |
12 bool altKey: false, bool shiftKey: false, bool metaKey: false}) { | 12 bool altKey: false, bool shiftKey: false, bool metaKey: false, |
| 13 bool altGraphKey: false}) { |
13 if (view == null) { | 14 if (view == null) { |
14 view = window; | 15 view = window; |
15 } | 16 } |
16 final e = document._createEvent("KeyboardEvent"); | 17 final e = document._createEvent("KeyboardEvent"); |
17 e._initKeyboardEvent(type, canBubble, cancelable, view, "", | 18 e._initKeyboardEvent(type, canBubble, cancelable, view, "", |
18 keyLocation, ctrlKey, altKey, shiftKey, metaKey); | 19 keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey); |
19 return e; | 20 return e; |
20 } | 21 } |
21 | 22 |
22 @DomName('KeyboardEvent.keyCode') | 23 @DomName('KeyboardEvent.keyCode') |
23 int get keyCode => _keyCode; | 24 int get keyCode => _keyCode; |
24 | 25 |
25 @DomName('KeyboardEvent.charCode') | 26 @DomName('KeyboardEvent.charCode') |
26 int get charCode => _charCode; | 27 int get charCode => _charCode; |
27 $!MEMBERS | 28 $!MEMBERS |
28 } | 29 } |
OLD | NEW |