the main keyboard struct add handlers wit add_handler, then call add_keypress/add_key_release/add_timeout to start processing keys.
| 103 | /// then call add_keypress/add_key_release/add_timeout |
| 104 | /// to start processing keys. |
| 105 | pub struct Keyboard<'a, T: USBKeyOut> { |
| 106 | events: Vec<(Event, EventStatus)>, |
| 107 | running_number: u8, |
| 108 | handlers: Vec<Box<dyn ProcessKeys<T> + Send + 'a>>, |
| 109 | pub output: T, |
| 110 | } |
| 111 | #[allow(clippy::new_without_default)] |
| 112 | impl<'a, T: USBKeyOut> Keyboard<'a, T> { |
| 113 | pub fn new(output: T) -> Keyboard<'a, T> { |
nothing calls this directly
no outgoing calls
no test coverage detected