| 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 * The mechanics of using KeyEvents is a little different from the underlying | 9 * The mechanics of using KeyEvents is a little different from the underlying |
| 10 * [KeyboardEvent]. To use KeyEvents, you need to create a stream and then add | 10 * [KeyboardEvent]. To use KeyEvents, you need to create a stream and then add |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 DataTransfer get clipboardData => _parent.clipboardData; | 117 DataTransfer get clipboardData => _parent.clipboardData; |
| 118 /** True if the ctrl key is pressed during this event. */ | 118 /** True if the ctrl key is pressed during this event. */ |
| 119 bool get ctrlKey => _parent.ctrlKey; | 119 bool get ctrlKey => _parent.ctrlKey; |
| 120 int get detail => _parent.detail; | 120 int get detail => _parent.detail; |
| 121 /** | 121 /** |
| 122 * Accessor to the part of the keyboard that the key was pressed from (one of | 122 * Accessor to the part of the keyboard that the key was pressed from (one of |
| 123 * KeyLocation.STANDARD, KeyLocation.RIGHT, KeyLocation.LEFT, | 123 * KeyLocation.STANDARD, KeyLocation.RIGHT, KeyLocation.LEFT, |
| 124 * KeyLocation.NUMPAD, KeyLocation.MOBILE, KeyLocation.JOYSTICK). | 124 * KeyLocation.NUMPAD, KeyLocation.MOBILE, KeyLocation.JOYSTICK). |
| 125 */ | 125 */ |
| 126 int get keyLocation => _parent.keyLocation; | 126 int get keyLocation => _parent.keyLocation; |
| 127 Point get layer => _parent.layer; | |
| 128 /** True if the Meta (or Mac command) key is pressed during this event. */ | 127 /** True if the Meta (or Mac command) key is pressed during this event. */ |
| 129 bool get metaKey => _parent.metaKey; | 128 bool get metaKey => _parent.metaKey; |
| 130 Point get page => _parent.page; | |
| 131 /** True if the shift key was pressed during this event. */ | 129 /** True if the shift key was pressed during this event. */ |
| 132 bool get shiftKey => _parent.shiftKey; | 130 bool get shiftKey => _parent.shiftKey; |
| 133 Window get view => _parent.view; | 131 Window get view => _parent.view; |
| 134 void _initUIEvent(String type, bool canBubble, bool cancelable, | 132 void _initUIEvent(String type, bool canBubble, bool cancelable, |
| 135 Window view, int detail) { | 133 Window view, int detail) { |
| 136 throw new UnsupportedError("Cannot initialize a UI Event from a KeyEvent."); | 134 throw new UnsupportedError("Cannot initialize a UI Event from a KeyEvent."); |
| 137 } | 135 } |
| 138 String get _shadowKeyIdentifier => _parent._keyIdentifier; | 136 String get _shadowKeyIdentifier => _parent._keyIdentifier; |
| 139 | 137 |
| 140 int get _charCode => charCode; | 138 int get _charCode => charCode; |
| 141 int get _keyCode => keyCode; | 139 int get _keyCode => keyCode; |
| 142 int get _which => which; | 140 int get _which => which; |
| 143 String get _keyIdentifier { | 141 String get _keyIdentifier { |
| 144 throw new UnsupportedError("keyIdentifier is unsupported."); | 142 throw new UnsupportedError("keyIdentifier is unsupported."); |
| 145 } | 143 } |
| 146 void _initKeyboardEvent(String type, bool canBubble, bool cancelable, | 144 void _initKeyboardEvent(String type, bool canBubble, bool cancelable, |
| 147 Window view, String keyIdentifier, int keyLocation, bool ctrlKey, | 145 Window view, String keyIdentifier, int keyLocation, bool ctrlKey, |
| 148 bool altKey, bool shiftKey, bool metaKey) { | 146 bool altKey, bool shiftKey, bool metaKey) { |
| 149 throw new UnsupportedError( | 147 throw new UnsupportedError( |
| 150 "Cannot initialize a KeyboardEvent from a KeyEvent."); | 148 "Cannot initialize a KeyboardEvent from a KeyEvent."); |
| 151 } | 149 } |
| 152 @Experimental() // untriaged | 150 @Experimental() // untriaged |
| 153 bool getModifierState(String keyArgument) => throw new UnimplementedError(); | 151 bool getModifierState(String keyArgument) => throw new UnimplementedError(); |
| 154 @Experimental() // untriaged | 152 @Experimental() // untriaged |
| 155 int get location => throw new UnimplementedError(); | 153 int get location => throw new UnimplementedError(); |
| 156 @Experimental() // untriaged | 154 @Experimental() // untriaged |
| 157 bool get repeat => throw new UnimplementedError(); | 155 bool get repeat => throw new UnimplementedError(); |
| 158 dynamic get _get_view => throw new UnimplementedError(); | 156 dynamic get _get_view => throw new UnimplementedError(); |
| 159 } | 157 } |
| OLD | NEW |