MCPcopy Index your code
hub / github.com/endbasic/endbasic / on_input_event_into_keys

Function on_input_event_into_keys

web/src/input.rs:30–35  ·  view source on GitHub ↗

Converts an HTML input event into our own `Key` representation.

(dom_event: InputEvent)

Source from the content-addressed store, hash-verified

28
29/// Converts an HTML input event into our own `Key` representation.
30fn 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.
38fn on_key_event_into_key(dom_event: KeyboardEvent) -> Key {

Callers 1

inject_input_eventMethod · 0.85

Calls 2

dataMethod · 0.80
charsMethod · 0.80

Tested by

no test coverage detected