MCPcopy Create free account
hub / github.com/TyberiusPrime/KeyToKey / ProcessKeys

Interface ProcessKeys

src/handlers/mod.rs:36–43  ·  view source on GitHub ↗

Handlers are defined by this trait they process the events, set their status to either Handled or Ignored (if more data is necessary), and send input to the computer via output

Source from the content-addressed store, hash-verified

34/// they process the events, set their status to either Handled or Ignored
35/// (if more data is necessary), and send input to the computer via output
36pub trait ProcessKeys<T: USBKeyOut> {
37 fn process_keys(&mut self, events: &mut Vec<(Event, EventStatus)>, output: &mut T) -> HandlerResult;
38 /// whether this handler is enabled after add_handlers
39 /// (true for most, false for Layers)
40 fn default_enabled(&self) -> bool {
41 true
42 }
43}
44
45pub enum HandlerResult {
46 NoOp,

Callers

nothing calls this directly

Implementers 14

test_helpers.rssrc/test_helpers.rs
premade.rssrc/premade.rs
oneshot.rssrc/handlers/oneshot.rs
spacecadet.rssrc/handlers/spacecadet.rs
rewrite_layer.rssrc/handlers/rewrite_layer.rs
unicodekeyboard.rssrc/handlers/unicodekeyboard.rs
autoshift.rssrc/handlers/autoshift.rs
longtap.rssrc/handlers/longtap.rs
tapdance.rssrc/handlers/tapdance.rs
usbkeyboard.rssrc/handlers/usbkeyboard.rs
debug_handlers.rssrc/handlers/debug_handlers.rs
macros.rssrc/handlers/macros.rs

Calls

no outgoing calls

Tested by

no test coverage detected