Converts an HTML input event into our own `Key` representation.
(dom_event: InputEvent)
| 28 | |
| 29 | /// Converts an HTML input event into our own `Key` representation. |
| 30 | fn on_input_event_into_keys(dom_event: InputEvent) -> Vec<Key> { |
| 31 | match dom_event.data() { |
| 32 | Some(data) => data.chars().map(Key::Char).collect(), |
| 33 | None => vec![], |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | /// Converts an HTML keyboard event into our own `Key` representation. |
| 38 | fn on_key_event_into_key(dom_event: KeyboardEvent) -> Key { |
no test coverage detected