| 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 |
| 11 * possible. Bugs welcome! | 11 * possible. Bugs welcome! |
| 12 */ | 12 */ |
| 13 part of html; |
| 14 |
| 13 class KeyEvent extends _WrappedEvent implements KeyboardEvent { | 15 class KeyEvent extends _WrappedEvent implements KeyboardEvent { |
| 14 /** The parent KeyboardEvent that this KeyEvent is wrapping and "fixing". */ | 16 /** The parent KeyboardEvent that this KeyEvent is wrapping and "fixing". */ |
| 15 KeyboardEvent _parent; | 17 KeyboardEvent _parent; |
| 16 | 18 |
| 17 /** The "fixed" value of whether the alt key is being pressed. */ | 19 /** The "fixed" value of whether the alt key is being pressed. */ |
| 18 bool _shadowAltKey; | 20 bool _shadowAltKey; |
| 19 | 21 |
| 20 /** Caculated value of what the estimated charCode is for this event. */ | 22 /** Caculated value of what the estimated charCode is for this event. */ |
| 21 int _shadowCharCode; | 23 int _shadowCharCode; |
| 22 | 24 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 throw new UnsupportedError("keyIdentifier is unsupported."); | 94 throw new UnsupportedError("keyIdentifier is unsupported."); |
| 93 } | 95 } |
| 94 void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable, | 96 void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable, |
| 95 Window view, String keyIdentifier, int keyLocation, bool ctrlKey, | 97 Window view, String keyIdentifier, int keyLocation, bool ctrlKey, |
| 96 bool altKey, bool shiftKey, bool metaKey, | 98 bool altKey, bool shiftKey, bool metaKey, |
| 97 bool altGraphKey) { | 99 bool altGraphKey) { |
| 98 throw new UnsupportedError( | 100 throw new UnsupportedError( |
| 99 "Cannot initialize a KeyboardEvent from a KeyEvent."); | 101 "Cannot initialize a KeyboardEvent from a KeyEvent."); |
| 100 } | 102 } |
| 101 } | 103 } |
| OLD | NEW |