Function freya::elements::onglobalkeydown
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:?}")
}
)
}