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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user