|
|
|
@ -3,7 +3,7 @@ use ffi::*;
|
|
|
|
|
use {Event};
|
|
|
|
|
use super::{Kind, Code, Press, Release};
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
|
|
|
|
|
pub enum Keyboard {
|
|
|
|
|
All,
|
|
|
|
|
Key(Key),
|
|
|
|
@ -53,7 +53,7 @@ impl Code for Keyboard {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
custom_derive! {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, IterVariants(KeyVariants))]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, IterVariants(KeyVariants))]
|
|
|
|
|
pub enum Key {
|
|
|
|
|
Reserved,
|
|
|
|
|
Esc,
|
|
|
|
@ -285,7 +285,7 @@ impl Code for Key {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
custom_derive! {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, IterVariants(KeyPadVariants))]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, IterVariants(KeyPadVariants))]
|
|
|
|
|
pub enum KeyPad {
|
|
|
|
|
Asterisk,
|
|
|
|
|
_7,
|
|
|
|
@ -357,7 +357,7 @@ impl Code for KeyPad {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
custom_derive! {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, IterVariants(MiscVariants))]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, IterVariants(MiscVariants))]
|
|
|
|
|
pub enum Misc {
|
|
|
|
|
ZenkakuHankaku,
|
|
|
|
|
ND102,
|
|
|
|
@ -849,7 +849,7 @@ impl Code for Misc {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
custom_derive! {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, IterVariants(FunctionVariants))]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, IterVariants(FunctionVariants))]
|
|
|
|
|
pub enum Function {
|
|
|
|
|
Press,
|
|
|
|
|
Esc,
|
|
|
|
@ -919,7 +919,7 @@ impl Code for Function {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
custom_derive! {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, IterVariants(BrailleVariants))]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, IterVariants(BrailleVariants))]
|
|
|
|
|
pub enum Braille {
|
|
|
|
|
Dot1,
|
|
|
|
|
Dot2,
|
|
|
|
@ -967,7 +967,7 @@ impl Code for Braille {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
custom_derive! {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, IterVariants(NumericVariants))]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, IterVariants(NumericVariants))]
|
|
|
|
|
pub enum Numeric {
|
|
|
|
|
_0,
|
|
|
|
|
_1,
|
|
|
|
@ -1027,7 +1027,7 @@ impl Code for Numeric {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
custom_derive! {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, IterVariants(TouchPadVariants))]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, IterVariants(TouchPadVariants))]
|
|
|
|
|
pub enum TouchPad {
|
|
|
|
|
Toggle,
|
|
|
|
|
On,
|
|
|
|
@ -1061,7 +1061,7 @@ impl Code for TouchPad {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
custom_derive! {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, IterVariants(CameraVariants))]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, IterVariants(CameraVariants))]
|
|
|
|
|
pub enum Camera {
|
|
|
|
|
ZoomIn,
|
|
|
|
|
ZoomOut,
|
|
|
|
@ -1103,7 +1103,7 @@ impl Code for Camera {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
custom_derive! {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, IterVariants(AttendantVariants))]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, IterVariants(AttendantVariants))]
|
|
|
|
|
pub enum Attendant {
|
|
|
|
|
On,
|
|
|
|
|
Off,
|
|
|
|
@ -1137,7 +1137,7 @@ impl Code for Attendant {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
custom_derive! {
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Debug, IterVariants(InputAssistVariants))]
|
|
|
|
|
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, IterVariants(InputAssistVariants))]
|
|
|
|
|
pub enum InputAssist {
|
|
|
|
|
Prev,
|
|
|
|
|
Next,
|
|
|
|
|