(
&mut self,
events: &mut Vec<(Event, EventStatus)>,
output: &mut T,
)
| 104 | } |
| 105 | impl<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)] |
| 122 | pub struct PressCounter { |
nothing calls this directly
no test coverage detected