Trait KeyboardControlled

Source
pub trait KeyboardControlled {
    // Required method
    fn handle_keypress(&mut self, k: KeyPress) -> Result<Option<KeyPress>>;
}
Expand description

Something that can respond to user KeyPress events

Required Methods§

Source

fn handle_keypress(&mut self, k: KeyPress) -> Result<Option<KeyPress>>

Process the given KeyPress

Should return Ok(None) if the KeyPress has been handled and no longer propagated, or Ok(Some(k)) if further processing is possible.

Implementors§