pub trait PressedKey: Debug {
type Context;
type Event;
// Required methods
fn handle_event(
&mut self,
context: Self::Context,
event: Event<Self::Event>,
) -> PressedKeyEvents<Self::Event>;
fn key_output(&self) -> KeyOutputState;
}
Expand description
PressedKeyState for a stateful pressed key value.
Required Associated Types§
Required Methods§
Sourcefn handle_event(
&mut self,
context: Self::Context,
event: Event<Self::Event>,
) -> PressedKeyEvents<Self::Event>
fn handle_event( &mut self, context: Self::Context, event: Event<Self::Event>, ) -> PressedKeyEvents<Self::Event>
Used to update the PressedKey’s state, and possibly yield event(s).
Sourcefn key_output(&self) -> KeyOutputState
fn key_output(&self) -> KeyOutputState
Output for the pressed key.