logo

Trait penrose::draw::KeyboardControlled[][src]

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

Something that can respond to user KeyPress events

Required methods

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