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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 /** Accessor to the underlying charCode value is the parent event. */ | 61 /** Accessor to the underlying charCode value is the parent event. */ |
62 int get _realCharCode => _parent.charCode; | 62 int get _realCharCode => _parent.charCode; |
63 | 63 |
64 /** Accessor to the underlying altKey value is the parent event. */ | 64 /** Accessor to the underlying altKey value is the parent event. */ |
65 bool get _realAltKey => _parent.altKey; | 65 bool get _realAltKey => _parent.altKey; |
66 | 66 |
67 /** Shadows on top of the parent's currentTarget. */ | 67 /** Shadows on top of the parent's currentTarget. */ |
68 EventTarget _currentTarget; | 68 EventTarget _currentTarget; |
69 | 69 |
| 70 final InputDeviceCapabilities sourceCapabilities; |
| 71 |
70 /** Construct a KeyEvent with [parent] as the event we're emulating. */ | 72 /** Construct a KeyEvent with [parent] as the event we're emulating. */ |
71 KeyEvent.wrap(KeyboardEvent parent) : super(parent) { | 73 KeyEvent.wrap(KeyboardEvent parent) : super(parent) { |
72 _parent = parent; | 74 _parent = parent; |
73 _shadowAltKey = _realAltKey; | 75 _shadowAltKey = _realAltKey; |
74 _shadowCharCode = _realCharCode; | 76 _shadowCharCode = _realCharCode; |
75 _shadowKeyCode = _realKeyCode; | 77 _shadowKeyCode = _realKeyCode; |
76 _currentTarget = | 78 _currentTarget = |
77 _parent.currentTarget == null ? window : _parent.currentTarget; | 79 _parent.currentTarget == null ? window : _parent.currentTarget; |
78 } | 80 } |
79 | 81 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 } | 166 } |
165 | 167 |
166 @Experimental() // untriaged | 168 @Experimental() // untriaged |
167 bool getModifierState(String keyArgument) => throw new UnimplementedError(); | 169 bool getModifierState(String keyArgument) => throw new UnimplementedError(); |
168 @Experimental() // untriaged | 170 @Experimental() // untriaged |
169 int get location => throw new UnimplementedError(); | 171 int get location => throw new UnimplementedError(); |
170 @Experimental() // untriaged | 172 @Experimental() // untriaged |
171 bool get repeat => throw new UnimplementedError(); | 173 bool get repeat => throw new UnimplementedError(); |
172 dynamic get _get_view => throw new UnimplementedError(); | 174 dynamic get _get_view => throw new UnimplementedError(); |
173 } | 175 } |
OLD | NEW |