module OSDKeys.Types where
import Data.Sequence (Seq)
import Data.Set (Set)
data State =
State {stateModifiers :: !(Set Key)
,stateCombos :: !(Seq Combo)
}
data Combo = Combo !(Set Key) !Key
deriving (Show)
data Event
= Press
| Release
deriving (Enum,Bounded,Eq,Show)
newtype KeyCode =
KeyCode Int
deriving (Eq,Show,Num,Ord)
newtype Device = Device Int
deriving (Num)
data Key
= CtrlL
| CtrlR
| AltL
| AltR
| ShiftL
| ShiftR
| RET
| SuperL
| SuperR
| CapsLock
| SPC
| F Int
| Escape
| Backspace
| Insert
| Delete
| Home
| Prior
| Next
| End
| UpArr
| DownArr
| LeftArr
| RightArr
| PrintScreen
| Menu
| TAB
| Plain Char
| Unknown KeyCode
deriving (Show,Ord,Eq)