-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Show keys pressed with an on-screen display (Linux only)
--   
--   This program uses the xinput program to get a stream of key presses
--   and uses the libnotify library to display them on-screen.
--   
--   Currently supported display notations are: Emacs
@package osdkeys
@version 0.0


-- | All types.
module OSDKeys.Types

-- | Key processing state.
data State
State :: !(Set Key) -> !(Seq Combo) -> State

-- | Perhaps on some systems order of key press matters, but this type
--   assumes it doesn't.
[stateModifiers] :: State -> !(Set Key)

-- | A sequence of key combinations e.g. "a" "C-f", "Alt-DEL", etc.
[stateCombos] :: State -> !(Seq Combo)

-- | A combination of some modifiers and a key.
data Combo
Combo :: !(Set Key) -> !Key -> Combo

-- | An event.
data Event
Press :: Event
Release :: Event

-- | Key code.
newtype KeyCode
KeyCode :: Int -> KeyCode

-- | Device identifier.
newtype Device
Device :: Int -> Device

-- | Well-typed key.
data Key
CtrlL :: Key
CtrlR :: Key
AltL :: Key
AltR :: Key
ShiftL :: Key
ShiftR :: Key
RET :: Key
SuperL :: Key
SuperR :: Key
CapsLock :: Key
SPC :: Key
F :: Int -> Key
Escape :: Key
Backspace :: Key
Insert :: Key
Delete :: Key
Home :: Key
Prior :: Key
Next :: Key
End :: Key
UpArr :: Key
DownArr :: Key
LeftArr :: Key
RightArr :: Key
PrintScreen :: Key
Menu :: Key
TAB :: Key
Plain :: Char -> Key
Unknown :: KeyCode -> Key
instance GHC.Show.Show OSDKeys.Types.Combo
instance GHC.Classes.Eq OSDKeys.Types.Key
instance GHC.Classes.Ord OSDKeys.Types.Key
instance GHC.Show.Show OSDKeys.Types.Key
instance GHC.Num.Num OSDKeys.Types.Device
instance GHC.Classes.Ord OSDKeys.Types.KeyCode
instance GHC.Num.Num OSDKeys.Types.KeyCode
instance GHC.Show.Show OSDKeys.Types.KeyCode
instance GHC.Classes.Eq OSDKeys.Types.KeyCode
instance GHC.Show.Show OSDKeys.Types.Event
instance GHC.Classes.Eq OSDKeys.Types.Event
instance GHC.Enum.Bounded OSDKeys.Types.Event
instance GHC.Enum.Enum OSDKeys.Types.Event


-- | A conduit interface to XInput events.
module OSDKeys.XInput

-- | Source of xinput keys.
xinputSource :: MonadIO m => Device -> ConduitM i (Event, KeyCode) m ExitCode


-- | Show keys pressed with an on-screen display (Linux only).
module OSDKeys

-- | Main entry point.
startOSDKeys :: Device -> Int -> IO ()
