[][src]Trait keebrs::translate::Translate

pub trait Translate {
    fn translate(&mut self, key: Option<ModuleKey>) -> Option<Translated>;
}

Trait for translating a physical key event to a keycode event

Required methods

fn translate(&mut self, key: Option<ModuleKey>) -> Option<Translated>

(Maybe) Translate a keystroke to a keycode

This should be called upon every scan, whether a key event occurred or not, as well as for every event sent from another module. The "no event" calls should be used by the translator to judge the passage of time and as a mechanism to send multiple keys "at the same time."

Loading content...

Implementors

impl Translate for Translator[src]

Loading content...