| OLD | NEW |
| 1 /** | 1 /** |
| 2 * A custom KeyboardEvent that attempts to eliminate cross-browser | 2 * A custom KeyboardEvent that attempts to eliminate cross-browser |
| 3 * inconsistencies, and also provide both keyCode and charCode information | 3 * inconsistencies, and also provide both keyCode and charCode information |
| 4 * for all key events (when such information can be determined). | 4 * for all key events (when such information can be determined). |
| 5 * | 5 * |
| 6 * KeyEvent tries to provide a higher level, more polished keyboard event | 6 * KeyEvent tries to provide a higher level, more polished keyboard event |
| 7 * information on top of the "raw" [KeyboardEvent]. | 7 * information on top of the "raw" [KeyboardEvent]. |
| 8 * | 8 * |
| 9 * This class is very much a work in progress, and we'd love to get information | 9 * This class is very much a work in progress, and we'd love to get information |
| 10 * on how we can make this class work with as many international keyboards as | 10 * on how we can make this class work with as many international keyboards as |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 * KeyLocation.NUMPAD, KeyLocation.MOBILE, KeyLocation.JOYSTICK). | 77 * KeyLocation.NUMPAD, KeyLocation.MOBILE, KeyLocation.JOYSTICK). |
| 78 */ | 78 */ |
| 79 int get keyLocation => _parent.keyLocation; | 79 int get keyLocation => _parent.keyLocation; |
| 80 Point get layer => _parent.layer; | 80 Point get layer => _parent.layer; |
| 81 /** True if the Meta (or Mac command) key is pressed during this event. */ | 81 /** True if the Meta (or Mac command) key is pressed during this event. */ |
| 82 bool get metaKey => _parent.metaKey; | 82 bool get metaKey => _parent.metaKey; |
| 83 Point get page => _parent.page; | 83 Point get page => _parent.page; |
| 84 /** True if the shift key was pressed during this event. */ | 84 /** True if the shift key was pressed during this event. */ |
| 85 bool get shiftKey => _parent.shiftKey; | 85 bool get shiftKey => _parent.shiftKey; |
| 86 Window get view => _parent.view; | 86 Window get view => _parent.view; |
| 87 void $dom_initUIEvent(String type, bool canBubble, bool cancelable, | 87 void _initUIEvent(String type, bool canBubble, bool cancelable, |
| 88 Window view, int detail) { | 88 Window view, int detail) { |
| 89 throw new UnsupportedError("Cannot initialize a UI Event from a KeyEvent."); | 89 throw new UnsupportedError("Cannot initialize a UI Event from a KeyEvent."); |
| 90 } | 90 } |
| 91 String get _shadowKeyIdentifier => _parent.$dom_keyIdentifier; | 91 String get _shadowKeyIdentifier => _parent._keyIdentifier; |
| 92 | 92 |
| 93 int get $dom_charCode => charCode; | 93 int get _charCode => charCode; |
| 94 int get $dom_keyCode => keyCode; | 94 int get _keyCode => keyCode; |
| 95 String get $dom_keyIdentifier { | 95 String get _keyIdentifier { |
| 96 throw new UnsupportedError("keyIdentifier is unsupported."); | 96 throw new UnsupportedError("keyIdentifier is unsupported."); |
| 97 } | 97 } |
| 98 void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable, | 98 void _initKeyboardEvent(String type, bool canBubble, bool cancelable, |
| 99 Window view, String keyIdentifier, int keyLocation, bool ctrlKey, | 99 Window view, String keyIdentifier, int keyLocation, bool ctrlKey, |
| 100 bool altKey, bool shiftKey, bool metaKey, | 100 bool altKey, bool shiftKey, bool metaKey, |
| 101 bool altGraphKey) { | 101 bool altGraphKey) { |
| 102 throw new UnsupportedError( | 102 throw new UnsupportedError( |
| 103 "Cannot initialize a KeyboardEvent from a KeyEvent."); | 103 "Cannot initialize a KeyboardEvent from a KeyEvent."); |
| 104 } | 104 } |
| 105 } | 105 } |
| OLD | NEW |