SpaceCadet Keys are keys that do one Action on tap, and an OnOff if depressed while the next key is pressed. There is a minimum time the key needs to be depressed, which you can configure with SpaceCadet.minimum_depress_ms (this is to allow fast typing where you actually hit the next key before the previous one has been released. It does happend...) They need to be added before the layer they to
| 35 | /// otherwise it will only work like a regular modifier with the space |
| 36 | /// cadet trigger. |
| 37 | pub struct SpaceCadet<MAction, MOnOff> { |
| 38 | trigger: u32, |
| 39 | action: MAction, |
| 40 | onoff: MOnOff, |
| 41 | press_number: u8, |
| 42 | state: SpaceCadetState, |
| 43 | pub minimum_depress_ms: u16, |
| 44 | } |
| 45 | impl<MAction: Action, MOnOff: OnOff> SpaceCadet<MAction, MOnOff> { |
| 46 | pub fn new( |
| 47 | trigger: impl AcceptsKeycode, |
nothing calls this directly
no outgoing calls
no test coverage detected