del: superfluous pedals

v0.2.1
rrr-marble 4 years ago
parent f878e01060
commit 3c0f8280b3

@ -24,33 +24,13 @@ pub fn pedals() -> Vec<Pedal> {
key: Key::KEY_KP7, key: Key::KEY_KP7,
action: Box::new(|tx| mash!(KEY_SPACE, 26, 31, tx)), action: Box::new(|tx| mash!(KEY_SPACE, 26, 31, tx)),
}, },
Pedal {
key: Key::BTN_SIDE,
action: Box::new(|tx| mash!(KEY_SPACE, 26, 31, tx)),
},
Pedal {
key: Key::BTN_EXTRA,
action: Box::new(|tx| mash!(KEY_F, 24, 33, tx)),
},
Pedal { Pedal {
key: Key::KEY_KP9, key: Key::KEY_KP9,
action: Box::new(|tx| mash!(KEY_F, 24, 33, tx)), action: Box::new(|tx| mash!(KEY_F, 24, 33, tx)),
}, },
Pedal {
key: Key::BTN_RIGHT,
action: Box::new(|tx| mash!(BTN_LEFT, 19, 26, tx)),
},
Pedal { Pedal {
key: Key::KEY_KP8, key: Key::KEY_KP8,
action: Box::new(|tx| { action: Box::new(|tx| mash!(BTN_LEFT, 19, 26, tx)),
let code = Key::BTN_LEFT.code();
let down_event = InputEvent::new(EventType::KEY, code, 1);
let up_event = InputEvent::new(EventType::KEY, code, 0);
tx.send(down_event).unwrap();
std::thread::sleep(std::time::Duration::from_millis(19));
tx.send(up_event).unwrap();
std::thread::sleep(std::time::Duration::from_millis(26));
}),
}, },
] ]
} }

Loading…
Cancel
Save