Function freya::prelude::dioxus_elements::onglobalkeydown

pub fn onglobalkeydown<E, T>(
    _f: impl FnMut(Event<KeyboardData>) -> E + 'static,
) -> Attribute
where 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:?}")
        }
    )
}