Function freya::elements::events::onglobalkeydown
source · pub fn onglobalkeydown<E, T>(
_f: impl FnMut(Event<KeyboardData>) -> E + 'static,
) -> Attributewhere
E: EventReturn<T>,
Expand description
The globalkeydown
event fires when the user starts pressing any key.
Event Data: KeyboardData
§Example
fn app() -> Element {
rsx!(
rect {
onglobalkeydown: |e| println!("Event: {e:?}")
}
)
}