use super::Component; /// A [`Component`] to handle keyboard shortcuts and assign actions to them. /// /// Inspired by [Flutter's approach](https://docs.flutter.dev/development/ui/advanced/actions_and_shortcuts). pub struct Shortcut { _p: std::marker::PhantomData, } impl Component for Shortcut { type Message = Msg; type Properties = (); fn on_event( &mut self, bounds: tui::layout::Rect, event: crate::tuine::Event, messages: &mut Vec, ) -> crate::tuine::Status { crate::tuine::Status::Ignored } fn update(&mut self, message: Self::Message) -> super::ShouldRender { false } fn change(&mut self, props: Self::Properties) -> super::ShouldRender { false } fn draw( &mut self, bounds: tui::layout::Rect, frame: &mut tui::Frame<'_, B>, ) { todo!() } }