Function cosmic::iced_futures::keyboard::on_key_press
source ยท pub fn on_key_press<Message>(
f: fn(_: Key, _: Modifiers) -> Option<Message>,
) -> Subscription<Message>where
Message: MaybeSend + 'static,
Expand description
Listens to keyboard key presses and calls the given function to map them into actual messages.
If the function returns None
, the key press will be simply
ignored.