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

Method process_keys

src/test_helpers.rs:106–119  ·  view source on GitHub ↗
(
        &mut self,
        events: &mut Vec<(Event, EventStatus)>,
        output: &mut T,
    )

Source from the content-addressed store, hash-verified

104}
105impl<T: USBKeyOut> ProcessKeys<T> for TimeoutLogger {
106 fn process_keys(
107 &mut self,
108 events: &mut Vec<(Event, EventStatus)>,
109 output: &mut T,
110 ) -> HandlerResult {
111 for (event, _status) in iter_unhandled_mut(events) {
112 if let Event::TimeOut(ms_since_last) = event {
113 if *ms_since_last > self.min_timeout_ms {
114 output.send_keys(&[self.keycode]);
115 }
116 }
117 }
118 HandlerResult::NoOp
119 }
120}
121#[derive(Debug)]
122pub struct PressCounter {

Callers

nothing calls this directly

Calls 2

iter_unhandled_mutFunction · 0.85
send_keysMethod · 0.80

Tested by

no test coverage detected