| 44 | } |
| 45 | impl<MAction: Action, MOnOff: OnOff> SpaceCadet<MAction, MOnOff> { |
| 46 | pub fn new( |
| 47 | trigger: impl AcceptsKeycode, |
| 48 | action: MAction, |
| 49 | onoff: MOnOff, |
| 50 | ) -> SpaceCadet<MAction, MOnOff> { |
| 51 | SpaceCadet { |
| 52 | trigger: trigger.to_u32(), |
| 53 | action, |
| 54 | onoff, |
| 55 | press_number: 0, //what was the running id of this? |
| 56 | state: SpaceCadetState::Base, |
| 57 | minimum_depress_ms: 100, |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | impl<T: USBKeyOut, MAction: Action, MOnOff: OnOff> ProcessKeys<T> for SpaceCadet<MAction, MOnOff> { |
| 62 | fn process_keys(&mut self, events: &mut Vec<(Event, EventStatus)>, output: &mut T) ->HandlerResult { |