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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 /** Accessor to provide a stream of KeyEvents on the desired target. */ | 178 /** Accessor to provide a stream of KeyEvents on the desired target. */ |
179 static EventStreamProvider<KeyEvent> keyDownEvent = | 179 static EventStreamProvider<KeyEvent> keyDownEvent = |
180 new _KeyboardEventHandler('keydown'); | 180 new _KeyboardEventHandler('keydown'); |
181 /** Accessor to provide a stream of KeyEvents on the desired target. */ | 181 /** Accessor to provide a stream of KeyEvents on the desired target. */ |
182 static EventStreamProvider<KeyEvent> keyUpEvent = | 182 static EventStreamProvider<KeyEvent> keyUpEvent = |
183 new _KeyboardEventHandler('keyup'); | 183 new _KeyboardEventHandler('keyup'); |
184 /** Accessor to provide a stream of KeyEvents on the desired target. */ | 184 /** Accessor to provide a stream of KeyEvents on the desired target. */ |
185 static EventStreamProvider<KeyEvent> keyPressEvent = | 185 static EventStreamProvider<KeyEvent> keyPressEvent = |
186 new _KeyboardEventHandler('keypress'); | 186 new _KeyboardEventHandler('keypress'); |
187 | 187 |
188 /** Accessor to the clipboardData available for this event. */ | |
189 DataTransfer get clipboardData => _parent.clipboardData; | |
190 String get code => _parent.code; | 188 String get code => _parent.code; |
191 /** True if the ctrl key is pressed during this event. */ | 189 /** True if the ctrl key is pressed during this event. */ |
192 bool get ctrlKey => _parent.ctrlKey; | 190 bool get ctrlKey => _parent.ctrlKey; |
193 int get detail => _parent.detail; | 191 int get detail => _parent.detail; |
194 String get key => _parent.key; | 192 String get key => _parent.key; |
195 /** | 193 /** |
196 * Accessor to the part of the keyboard that the key was pressed from (one of | 194 * Accessor to the part of the keyboard that the key was pressed from (one of |
197 * KeyLocation.STANDARD, KeyLocation.RIGHT, KeyLocation.LEFT, | 195 * KeyLocation.STANDARD, KeyLocation.RIGHT, KeyLocation.LEFT, |
198 * KeyLocation.NUMPAD, KeyLocation.MOBILE, KeyLocation.JOYSTICK). | 196 * KeyLocation.NUMPAD, KeyLocation.MOBILE, KeyLocation.JOYSTICK). |
199 */ | 197 */ |
(...skipping 24 matching lines...) Expand all Loading... |
224 "Cannot initialize a KeyboardEvent from a KeyEvent."); | 222 "Cannot initialize a KeyboardEvent from a KeyEvent."); |
225 } | 223 } |
226 @Experimental() // untriaged | 224 @Experimental() // untriaged |
227 bool getModifierState(String keyArgument) => throw new UnimplementedError(); | 225 bool getModifierState(String keyArgument) => throw new UnimplementedError(); |
228 @Experimental() // untriaged | 226 @Experimental() // untriaged |
229 int get location => throw new UnimplementedError(); | 227 int get location => throw new UnimplementedError(); |
230 @Experimental() // untriaged | 228 @Experimental() // untriaged |
231 bool get repeat => throw new UnimplementedError(); | 229 bool get repeat => throw new UnimplementedError(); |
232 dynamic get _get_view => throw new UnimplementedError(); | 230 dynamic get _get_view => throw new UnimplementedError(); |
233 } | 231 } |
OLD | NEW |