| 1 | use no_std_compat::prelude::v1::*; |
| 2 | #[derive(PartialEq, Debug)] |
| 3 | pub struct Key { |
| 4 | pub keycode: u32, |
| 5 | pub original_keycode: u32, //used to match key press/release pairs - can we save on this anyhow? |
| 6 | pub ms_since_last: u16, |
| 7 | pub running_number: u8, |
| 8 | pub flag: u8, //Todo: express this better |
| 9 | //bit 0 is used by Usbkeyboard to decide whether a KeyPress has ever been sent |
| 10 | //(or kept back by a different handler so far) |
| 11 | //bit1 is used to protect against double rewrites in Layers |
| 12 | //bit2 is used by SpaceCadet. |
| 13 | } |
| 14 | impl Key { |
| 15 | pub fn new(keycode: u32) -> Key { |
| 16 | Key { |
nothing calls this directly
no outgoing calls
no test coverage detected