Added support to write modifiers to footswitch.

Reading modifiers is not yet supported. This will be supported in the
next commit.
This commit is contained in:
2018-08-01 01:00:21 +02:00
parent 3122491557
commit e6a23707b3
3 changed files with 28 additions and 2 deletions

View File

@@ -276,13 +276,25 @@ static KEY_MAP : &[(&str, u8)] = &[
("<ff>" , 0xff),
];
enum Modifier {
pub enum Modifier {
Ctrl = 1,
Shift = 2,
Alt = 4,
Win = 8,
}
impl Modifier {
pub fn value(modifier:&str) -> Option<Modifier> {
match modifier {
"ctrl" => Some(Modifier::Ctrl),
"shift" => Some(Modifier::Shift),
"alt" => Some(Modifier::Alt),
"win" => Some(Modifier::Win),
_ => None,
}
}
}
enum MouseButton {
MouseLeft = 1,
MouseRight = 2,