-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Bindings to libevdev -- -- Provides access to the Linux event device interface. @package evdev @version 2.3.1 -- | Datatypes corresponding to the constants in -- input-event-codes.h. See the Linux Kernel documentation -- for full details, noting that all names have been mechanically -- transformed into CamelCase. module Evdev.Codes -- | Each of these corresponds to one of the contructors of -- EventData. So you're unlikely to need to use these directly (C -- doesn't have ADTs - we do). data EventType EvSyn :: EventType EvKey :: EventType EvRel :: EventType EvAbs :: EventType EvMsc :: EventType EvSw :: EventType EvLed :: EventType EvSnd :: EventType EvRep :: EventType EvFf :: EventType EvPwr :: EventType EvFfStatus :: EventType data SyncEvent SynReport :: SyncEvent SynConfig :: SyncEvent SynMtReport :: SyncEvent SynDropped :: SyncEvent -- | Keys and buttons data Key KeyReserved :: Key KeyEsc :: Key Key1 :: Key Key2 :: Key Key3 :: Key Key4 :: Key Key5 :: Key Key6 :: Key Key7 :: Key Key8 :: Key Key9 :: Key Key0 :: Key KeyMinus :: Key KeyEqual :: Key KeyBackspace :: Key KeyTab :: Key KeyQ :: Key KeyW :: Key KeyE :: Key KeyR :: Key KeyT :: Key KeyY :: Key KeyU :: Key KeyI :: Key KeyO :: Key KeyP :: Key KeyLeftbrace :: Key KeyRightbrace :: Key KeyEnter :: Key KeyLeftctrl :: Key KeyA :: Key KeyS :: Key KeyD :: Key KeyF :: Key KeyG :: Key KeyH :: Key KeyJ :: Key KeyK :: Key KeyL :: Key KeySemicolon :: Key KeyApostrophe :: Key KeyGrave :: Key KeyLeftshift :: Key KeyBackslash :: Key KeyZ :: Key KeyX :: Key KeyC :: Key KeyV :: Key KeyB :: Key KeyN :: Key KeyM :: Key KeyComma :: Key KeyDot :: Key KeySlash :: Key KeyRightshift :: Key KeyKpasterisk :: Key KeyLeftalt :: Key KeySpace :: Key KeyCapslock :: Key KeyF1 :: Key KeyF2 :: Key KeyF3 :: Key KeyF4 :: Key KeyF5 :: Key KeyF6 :: Key KeyF7 :: Key KeyF8 :: Key KeyF9 :: Key KeyF10 :: Key KeyNumlock :: Key KeyScrolllock :: Key KeyKp7 :: Key KeyKp8 :: Key KeyKp9 :: Key KeyKpminus :: Key KeyKp4 :: Key KeyKp5 :: Key KeyKp6 :: Key KeyKpplus :: Key KeyKp1 :: Key KeyKp2 :: Key KeyKp3 :: Key KeyKp0 :: Key KeyKpdot :: Key KeyZenkakuhankaku :: Key Key102nd :: Key KeyF11 :: Key KeyF12 :: Key KeyRo :: Key KeyKatakana :: Key KeyHiragana :: Key KeyHenkan :: Key KeyKatakanahiragana :: Key KeyMuhenkan :: Key KeyKpjpcomma :: Key KeyKpenter :: Key KeyRightctrl :: Key KeyKpslash :: Key KeySysrq :: Key KeyRightalt :: Key KeyLinefeed :: Key KeyHome :: Key KeyUp :: Key KeyPageup :: Key KeyLeft :: Key KeyRight :: Key KeyEnd :: Key KeyDown :: Key KeyPagedown :: Key KeyInsert :: Key KeyDelete :: Key KeyMacro :: Key KeyMute :: Key KeyVolumedown :: Key KeyVolumeup :: Key KeyPower :: Key KeyKpequal :: Key KeyKpplusminus :: Key KeyPause :: Key KeyScale :: Key KeyKpcomma :: Key KeyHangeul :: Key KeyHanja :: Key KeyYen :: Key KeyLeftmeta :: Key KeyRightmeta :: Key KeyCompose :: Key KeyStop :: Key KeyAgain :: Key KeyProps :: Key KeyUndo :: Key KeyFront :: Key KeyCopy :: Key KeyOpen :: Key KeyPaste :: Key KeyFind :: Key KeyCut :: Key KeyHelp :: Key KeyMenu :: Key KeyCalc :: Key KeySetup :: Key KeySleep :: Key KeyWakeup :: Key KeyFile :: Key KeySendfile :: Key KeyDeletefile :: Key KeyXfer :: Key KeyProg1 :: Key KeyProg2 :: Key KeyWww :: Key KeyMsdos :: Key KeyScreenlock :: Key KeyRotateDisplay :: Key KeyCyclewindows :: Key KeyMail :: Key KeyBookmarks :: Key KeyComputer :: Key KeyBack :: Key KeyForward :: Key KeyClosecd :: Key KeyEjectcd :: Key KeyEjectclosecd :: Key KeyNextsong :: Key KeyPlaypause :: Key KeyPrevioussong :: Key KeyStopcd :: Key KeyRecord :: Key KeyRewind :: Key KeyPhone :: Key KeyIso :: Key KeyConfig :: Key KeyHomepage :: Key KeyRefresh :: Key KeyExit :: Key KeyMove :: Key KeyEdit :: Key KeyScrollup :: Key KeyScrolldown :: Key KeyKpleftparen :: Key KeyKprightparen :: Key KeyNew :: Key KeyRedo :: Key KeyF13 :: Key KeyF14 :: Key KeyF15 :: Key KeyF16 :: Key KeyF17 :: Key KeyF18 :: Key KeyF19 :: Key KeyF20 :: Key KeyF21 :: Key KeyF22 :: Key KeyF23 :: Key KeyF24 :: Key KeyPlaycd :: Key KeyPausecd :: Key KeyProg3 :: Key KeyProg4 :: Key KeyDashboard :: Key KeySuspend :: Key KeyClose :: Key KeyPlay :: Key KeyFastforward :: Key KeyBassboost :: Key KeyPrint :: Key KeyHp :: Key KeyCamera :: Key KeySound :: Key KeyQuestion :: Key KeyEmail :: Key KeyChat :: Key KeySearch :: Key KeyConnect :: Key KeyFinance :: Key KeySport :: Key KeyShop :: Key KeyAlterase :: Key KeyCancel :: Key KeyBrightnessdown :: Key KeyBrightnessup :: Key KeyMedia :: Key KeySwitchvideomode :: Key KeyKbdillumtoggle :: Key KeyKbdillumdown :: Key KeyKbdillumup :: Key KeySend :: Key KeyReply :: Key KeyForwardmail :: Key KeySave :: Key KeyDocuments :: Key KeyBattery :: Key KeyBluetooth :: Key KeyWlan :: Key KeyUwb :: Key KeyUnknown :: Key KeyVideoNext :: Key KeyVideoPrev :: Key KeyBrightnessCycle :: Key KeyBrightnessAuto :: Key KeyDisplayOff :: Key KeyWwan :: Key KeyRfkill :: Key KeyMicmute :: Key Btn0 :: Key Btn1 :: Key Btn2 :: Key Btn3 :: Key Btn4 :: Key Btn5 :: Key Btn6 :: Key Btn7 :: Key Btn8 :: Key Btn9 :: Key BtnLeft :: Key BtnRight :: Key BtnMiddle :: Key BtnSide :: Key BtnExtra :: Key BtnForward :: Key BtnBack :: Key BtnTask :: Key BtnJoystick :: Key BtnThumb :: Key BtnThumb2 :: Key BtnTop :: Key BtnTop2 :: Key BtnPinkie :: Key BtnBase :: Key BtnBase2 :: Key BtnBase3 :: Key BtnBase4 :: Key BtnBase5 :: Key BtnBase6 :: Key BtnDead :: Key BtnA :: Key BtnB :: Key BtnC :: Key BtnX :: Key BtnY :: Key BtnZ :: Key BtnTl :: Key BtnTr :: Key BtnTl2 :: Key BtnTr2 :: Key BtnSelect :: Key BtnStart :: Key BtnMode :: Key BtnThumbl :: Key BtnThumbr :: Key BtnToolPen :: Key BtnToolRubber :: Key BtnToolBrush :: Key BtnToolPencil :: Key BtnToolAirbrush :: Key BtnToolFinger :: Key BtnToolMouse :: Key BtnToolLens :: Key BtnToolQuinttap :: Key BtnTouch :: Key BtnStylus :: Key BtnStylus2 :: Key BtnToolDoubletap :: Key BtnToolTripletap :: Key BtnToolQuadtap :: Key BtnGearDown :: Key BtnGearUp :: Key KeyOk :: Key KeySelect :: Key KeyGoto :: Key KeyClear :: Key KeyPower2 :: Key KeyOption :: Key KeyInfo :: Key KeyTime :: Key KeyVendor :: Key KeyArchive :: Key KeyProgram :: Key KeyChannel :: Key KeyFavorites :: Key KeyEpg :: Key KeyPvr :: Key KeyMhp :: Key KeyLanguage :: Key KeyTitle :: Key KeySubtitle :: Key KeyAngle :: Key KeyZoom :: Key KeyMode :: Key KeyKeyboard :: Key KeyScreen :: Key KeyPc :: Key KeyTv :: Key KeyTv2 :: Key KeyVcr :: Key KeyVcr2 :: Key KeySat :: Key KeySat2 :: Key KeyCd :: Key KeyTape :: Key KeyRadio :: Key KeyTuner :: Key KeyPlayer :: Key KeyText :: Key KeyDvd :: Key KeyAux :: Key KeyMp3 :: Key KeyAudio :: Key KeyVideo :: Key KeyDirectory :: Key KeyList :: Key KeyMemo :: Key KeyCalendar :: Key KeyRed :: Key KeyGreen :: Key KeyYellow :: Key KeyBlue :: Key KeyChannelup :: Key KeyChanneldown :: Key KeyFirst :: Key KeyLast :: Key KeyAb :: Key KeyNext :: Key KeyRestart :: Key KeySlow :: Key KeyShuffle :: Key KeyBreak :: Key KeyPrevious :: Key KeyDigits :: Key KeyTeen :: Key KeyTwen :: Key KeyVideophone :: Key KeyGames :: Key KeyZoomin :: Key KeyZoomout :: Key KeyZoomreset :: Key KeyWordprocessor :: Key KeyEditor :: Key KeySpreadsheet :: Key KeyGraphicseditor :: Key KeyPresentation :: Key KeyDatabase :: Key KeyNews :: Key KeyVoicemail :: Key KeyAddressbook :: Key KeyMessenger :: Key KeyDisplaytoggle :: Key KeySpellcheck :: Key KeyLogoff :: Key KeyDollar :: Key KeyEuro :: Key KeyFrameback :: Key KeyFrameforward :: Key KeyContextMenu :: Key KeyMediaRepeat :: Key Key10channelsup :: Key Key10channelsdown :: Key KeyImages :: Key KeyDelEol :: Key KeyDelEos :: Key KeyInsLine :: Key KeyDelLine :: Key KeyFn :: Key KeyFnEsc :: Key KeyFnF1 :: Key KeyFnF2 :: Key KeyFnF3 :: Key KeyFnF4 :: Key KeyFnF5 :: Key KeyFnF6 :: Key KeyFnF7 :: Key KeyFnF8 :: Key KeyFnF9 :: Key KeyFnF10 :: Key KeyFnF11 :: Key KeyFnF12 :: Key KeyFn1 :: Key KeyFn2 :: Key KeyFnD :: Key KeyFnE :: Key KeyFnF :: Key KeyFnS :: Key KeyFnB :: Key KeyBrlDot1 :: Key KeyBrlDot2 :: Key KeyBrlDot3 :: Key KeyBrlDot4 :: Key KeyBrlDot5 :: Key KeyBrlDot6 :: Key KeyBrlDot7 :: Key KeyBrlDot8 :: Key KeyBrlDot9 :: Key KeyBrlDot10 :: Key KeyNumeric0 :: Key KeyNumeric1 :: Key KeyNumeric2 :: Key KeyNumeric3 :: Key KeyNumeric4 :: Key KeyNumeric5 :: Key KeyNumeric6 :: Key KeyNumeric7 :: Key KeyNumeric8 :: Key KeyNumeric9 :: Key KeyNumericStar :: Key KeyNumericPound :: Key KeyNumericA :: Key KeyNumericB :: Key KeyNumericC :: Key KeyNumericD :: Key KeyCameraFocus :: Key KeyWpsButton :: Key KeyTouchpadToggle :: Key KeyTouchpadOn :: Key KeyTouchpadOff :: Key KeyCameraZoomin :: Key KeyCameraZoomout :: Key KeyCameraUp :: Key KeyCameraDown :: Key KeyCameraLeft :: Key KeyCameraRight :: Key KeyAttendantOn :: Key KeyAttendantOff :: Key KeyAttendantToggle :: Key KeyLightsToggle :: Key BtnDpadUp :: Key BtnDpadDown :: Key BtnDpadLeft :: Key BtnDpadRight :: Key KeyAlsToggle :: Key KeyButtonconfig :: Key KeyTaskmanager :: Key KeyJournal :: Key KeyControlpanel :: Key KeyAppselect :: Key KeyScreensaver :: Key KeyVoicecommand :: Key KeyBrightnessMin :: Key KeyBrightnessMax :: Key KeyKbdinputassistPrev :: Key KeyKbdinputassistNext :: Key KeyKbdinputassistPrevgroup :: Key KeyKbdinputassistNextgroup :: Key KeyKbdinputassistAccept :: Key KeyKbdinputassistCancel :: Key BtnTriggerHappy1 :: Key BtnTriggerHappy2 :: Key BtnTriggerHappy3 :: Key BtnTriggerHappy4 :: Key BtnTriggerHappy5 :: Key BtnTriggerHappy6 :: Key BtnTriggerHappy7 :: Key BtnTriggerHappy8 :: Key BtnTriggerHappy9 :: Key BtnTriggerHappy10 :: Key BtnTriggerHappy11 :: Key BtnTriggerHappy12 :: Key BtnTriggerHappy13 :: Key BtnTriggerHappy14 :: Key BtnTriggerHappy15 :: Key BtnTriggerHappy16 :: Key BtnTriggerHappy17 :: Key BtnTriggerHappy18 :: Key BtnTriggerHappy19 :: Key BtnTriggerHappy20 :: Key BtnTriggerHappy21 :: Key BtnTriggerHappy22 :: Key BtnTriggerHappy23 :: Key BtnTriggerHappy24 :: Key BtnTriggerHappy25 :: Key BtnTriggerHappy26 :: Key BtnTriggerHappy27 :: Key BtnTriggerHappy28 :: Key BtnTriggerHappy29 :: Key BtnTriggerHappy30 :: Key BtnTriggerHappy31 :: Key BtnTriggerHappy32 :: Key BtnTriggerHappy33 :: Key BtnTriggerHappy34 :: Key BtnTriggerHappy35 :: Key BtnTriggerHappy36 :: Key BtnTriggerHappy37 :: Key BtnTriggerHappy38 :: Key BtnTriggerHappy39 :: Key BtnTriggerHappy40 :: Key pattern KeyHanguel :: Key pattern KeyCoffee :: Key pattern KeyDirection :: Key pattern KeyBrightnessZero :: Key pattern KeyWimax :: Key pattern BtnMisc :: Key pattern BtnMouse :: Key pattern BtnTrigger :: Key pattern BtnGamepad :: Key pattern BtnSouth :: Key pattern BtnEast :: Key pattern BtnNorth :: Key pattern BtnWest :: Key pattern BtnDigi :: Key pattern BtnWheel :: Key pattern KeyBrightnessToggle :: Key pattern BtnTriggerHappy :: Key -- | Relative changes data RelativeAxis RelX :: RelativeAxis RelY :: RelativeAxis RelZ :: RelativeAxis RelRx :: RelativeAxis RelRy :: RelativeAxis RelRz :: RelativeAxis RelHwheel :: RelativeAxis RelDial :: RelativeAxis RelWheel :: RelativeAxis RelMisc :: RelativeAxis RelReserved :: RelativeAxis RelWheelHiRes :: RelativeAxis RelHWheelHiRes :: RelativeAxis -- | Absolute changes data AbsoluteAxis AbsX :: AbsoluteAxis AbsY :: AbsoluteAxis AbsZ :: AbsoluteAxis AbsRx :: AbsoluteAxis AbsRy :: AbsoluteAxis AbsRz :: AbsoluteAxis AbsThrottle :: AbsoluteAxis AbsRudder :: AbsoluteAxis AbsWheel :: AbsoluteAxis AbsGas :: AbsoluteAxis AbsBrake :: AbsoluteAxis AbsHat0x :: AbsoluteAxis AbsHat0y :: AbsoluteAxis AbsHat1x :: AbsoluteAxis AbsHat1y :: AbsoluteAxis AbsHat2x :: AbsoluteAxis AbsHat2y :: AbsoluteAxis AbsHat3x :: AbsoluteAxis AbsHat3y :: AbsoluteAxis AbsPressure :: AbsoluteAxis AbsDistance :: AbsoluteAxis AbsTiltX :: AbsoluteAxis AbsTiltY :: AbsoluteAxis AbsToolWidth :: AbsoluteAxis AbsVolume :: AbsoluteAxis AbsMisc :: AbsoluteAxis AbsReserved :: AbsoluteAxis AbsMtSlot :: AbsoluteAxis AbsMtTouchMajor :: AbsoluteAxis AbsMtTouchMinor :: AbsoluteAxis AbsMtWidthMajor :: AbsoluteAxis AbsMtWidthMinor :: AbsoluteAxis AbsMtOrientation :: AbsoluteAxis AbsMtPositionX :: AbsoluteAxis AbsMtPositionY :: AbsoluteAxis AbsMtToolType :: AbsoluteAxis AbsMtBlobId :: AbsoluteAxis AbsMtTrackingId :: AbsoluteAxis AbsMtPressure :: AbsoluteAxis AbsMtDistance :: AbsoluteAxis AbsMtToolX :: AbsoluteAxis AbsMtToolY :: AbsoluteAxis -- | Stateful binary switches data SwitchEvent SwLid :: SwitchEvent SwTabletMode :: SwitchEvent SwHeadphoneInsert :: SwitchEvent SwRfkillAll :: SwitchEvent SwRadio :: SwitchEvent SwMicrophoneInsert :: SwitchEvent SwDock :: SwitchEvent SwLineoutInsert :: SwitchEvent SwJackPhysicalInsert :: SwitchEvent SwVideooutInsert :: SwitchEvent SwCameraLensCover :: SwitchEvent SwKeypadSlide :: SwitchEvent SwFrontProximity :: SwitchEvent SwRotateLock :: SwitchEvent SwLineinInsert :: SwitchEvent SwMuteDevice :: SwitchEvent -- | Miscellaneous data MiscEvent MscSerial :: MiscEvent MscPulseled :: MiscEvent MscGesture :: MiscEvent MscRaw :: MiscEvent MscScan :: MiscEvent MscTimestamp :: MiscEvent -- | LEDs data LEDEvent LedNuml :: LEDEvent LedCapsl :: LEDEvent LedScrolll :: LEDEvent LedCompose :: LEDEvent LedKana :: LEDEvent LedSleep :: LEDEvent LedSuspend :: LEDEvent LedMute :: LEDEvent LedMisc :: LEDEvent LedMail :: LEDEvent LedCharging :: LEDEvent -- | Specifying autorepeating events data RepeatEvent RepDelay :: RepeatEvent RepPeriod :: RepeatEvent -- | For simple sound output devices data SoundEvent SndClick :: SoundEvent SndBell :: SoundEvent SndTone :: SoundEvent -- | Device properties data DeviceProperty InputPropPointer :: DeviceProperty InputPropDirect :: DeviceProperty InputPropButtonpad :: DeviceProperty InputPropSemiMt :: DeviceProperty InputPropTopbuttonpad :: DeviceProperty InputPropPointingStick :: DeviceProperty InputPropAccelerometer :: DeviceProperty instance GHC.Show.Show Evdev.Codes.EventType instance GHC.Read.Read Evdev.Codes.EventType instance GHC.Classes.Ord Evdev.Codes.EventType instance GHC.Classes.Eq Evdev.Codes.EventType instance GHC.Enum.Bounded Evdev.Codes.EventType instance GHC.Show.Show Evdev.Codes.SyncEvent instance GHC.Read.Read Evdev.Codes.SyncEvent instance GHC.Classes.Ord Evdev.Codes.SyncEvent instance GHC.Classes.Eq Evdev.Codes.SyncEvent instance GHC.Enum.Bounded Evdev.Codes.SyncEvent instance GHC.Show.Show Evdev.Codes.Key instance GHC.Read.Read Evdev.Codes.Key instance GHC.Classes.Ord Evdev.Codes.Key instance GHC.Classes.Eq Evdev.Codes.Key instance GHC.Enum.Bounded Evdev.Codes.Key instance GHC.Show.Show Evdev.Codes.RelativeAxis instance GHC.Read.Read Evdev.Codes.RelativeAxis instance GHC.Classes.Ord Evdev.Codes.RelativeAxis instance GHC.Classes.Eq Evdev.Codes.RelativeAxis instance GHC.Enum.Bounded Evdev.Codes.RelativeAxis instance GHC.Show.Show Evdev.Codes.AbsoluteAxis instance GHC.Read.Read Evdev.Codes.AbsoluteAxis instance GHC.Classes.Ord Evdev.Codes.AbsoluteAxis instance GHC.Classes.Eq Evdev.Codes.AbsoluteAxis instance GHC.Enum.Bounded Evdev.Codes.AbsoluteAxis instance GHC.Show.Show Evdev.Codes.SwitchEvent instance GHC.Read.Read Evdev.Codes.SwitchEvent instance GHC.Classes.Ord Evdev.Codes.SwitchEvent instance GHC.Classes.Eq Evdev.Codes.SwitchEvent instance GHC.Enum.Bounded Evdev.Codes.SwitchEvent instance GHC.Show.Show Evdev.Codes.MiscEvent instance GHC.Read.Read Evdev.Codes.MiscEvent instance GHC.Classes.Ord Evdev.Codes.MiscEvent instance GHC.Classes.Eq Evdev.Codes.MiscEvent instance GHC.Enum.Bounded Evdev.Codes.MiscEvent instance GHC.Show.Show Evdev.Codes.LEDEvent instance GHC.Read.Read Evdev.Codes.LEDEvent instance GHC.Classes.Ord Evdev.Codes.LEDEvent instance GHC.Classes.Eq Evdev.Codes.LEDEvent instance GHC.Enum.Bounded Evdev.Codes.LEDEvent instance GHC.Show.Show Evdev.Codes.RepeatEvent instance GHC.Read.Read Evdev.Codes.RepeatEvent instance GHC.Classes.Ord Evdev.Codes.RepeatEvent instance GHC.Classes.Eq Evdev.Codes.RepeatEvent instance GHC.Enum.Bounded Evdev.Codes.RepeatEvent instance GHC.Show.Show Evdev.Codes.SoundEvent instance GHC.Read.Read Evdev.Codes.SoundEvent instance GHC.Classes.Ord Evdev.Codes.SoundEvent instance GHC.Classes.Eq Evdev.Codes.SoundEvent instance GHC.Enum.Bounded Evdev.Codes.SoundEvent instance GHC.Show.Show Evdev.Codes.DeviceProperty instance GHC.Read.Read Evdev.Codes.DeviceProperty instance GHC.Classes.Ord Evdev.Codes.DeviceProperty instance GHC.Classes.Eq Evdev.Codes.DeviceProperty instance GHC.Enum.Bounded Evdev.Codes.DeviceProperty instance GHC.Enum.Enum Evdev.Codes.DeviceProperty instance GHC.Enum.Enum Evdev.Codes.SoundEvent instance GHC.Enum.Enum Evdev.Codes.RepeatEvent instance GHC.Enum.Enum Evdev.Codes.LEDEvent instance GHC.Enum.Enum Evdev.Codes.MiscEvent instance GHC.Enum.Enum Evdev.Codes.SwitchEvent instance GHC.Enum.Enum Evdev.Codes.AbsoluteAxis instance GHC.Enum.Enum Evdev.Codes.RelativeAxis instance GHC.Enum.Enum Evdev.Codes.Key instance GHC.Enum.Enum Evdev.Codes.SyncEvent instance GHC.Enum.Enum Evdev.Codes.EventType -- | The main module for working with devices and events. module Evdev -- | An input device. data Device -- | Create a device from a valid path - usually /dev/input/eventX -- for some numeric X. Use newDeviceFromFd if you need more -- control over how the device is created. newDevice :: RawFilePath -> IO Device -- | Get the next event from the device. nextEvent :: Device -> IO Event -- | The usual directory containing devices ("/dev/input"). evdevDir :: RawFilePath deviceName :: Device -> IO ByteString devicePath :: Device -> ByteString deviceProperties :: Device -> IO [DeviceProperty] deviceEventTypes :: Device -> IO [EventType] deviceHasEvent :: Device -> EventData -> IO Bool deviceFd :: Device -> IO Fd devicePhys :: Device -> IO (Maybe ByteString) deviceUniq :: Device -> IO (Maybe ByteString) deviceProduct :: Device -> IO Int deviceVendor :: Device -> IO Int deviceBustype :: Device -> IO Int deviceVersion :: Device -> IO Int deviceAbsAxis :: Device -> AbsoluteAxis -> IO (Maybe AbsInfo) data AbsInfo AbsInfo :: Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> AbsInfo [absValue] :: AbsInfo -> Int32 [absMinimum] :: AbsInfo -> Int32 [absMaximum] :: AbsInfo -> Int32 [absFuzz] :: AbsInfo -> Int32 [absFlat] :: AbsInfo -> Int32 [absResolution] :: AbsInfo -> Int32 -- | Prevent other clients (including kernel-internal ones) from receiving -- events. Often a bad idea. grabDevice :: Device -> IO () -- | Release a grabbed device. ungrabDevice :: Device -> IO () -- | An input event, including the timestamp. data Event Event :: EventData -> DiffTime -> Event [eventData] :: Event -> EventData [eventTime] :: Event -> DiffTime -- | An input event, without the timestamp. Each constructor corresponds to -- one event type, except for UnknownEvent. data EventData SyncEvent :: SyncEvent -> EventData KeyEvent :: Key -> KeyEvent -> EventData RelativeEvent :: RelativeAxis -> EventValue -> EventData AbsoluteEvent :: AbsoluteAxis -> EventValue -> EventData MiscEvent :: MiscEvent -> EventValue -> EventData SwitchEvent :: SwitchEvent -> EventValue -> EventData LEDEvent :: LEDEvent -> EventValue -> EventData SoundEvent :: SoundEvent -> EventValue -> EventData RepeatEvent :: RepeatEvent -> EventValue -> EventData ForceFeedbackEvent :: EventCode -> EventValue -> EventData PowerEvent :: EventCode -> EventValue -> EventData ForceFeedbackStatusEvent :: EventCode -> EventValue -> EventData -- | We include this primarily so that fromCEvent can be -- well-defined - let us know if you ever actually see one emitted by a -- device, as it would likely indicate a shortcoming in the library. UnknownEvent :: Word16 -> EventCode -> EventValue -> EventData -- | The status of a key. data KeyEvent Released :: KeyEvent Pressed :: KeyEvent Repeated :: KeyEvent -- | A direct representation of the code field of the C -- input_event, for when there is no obvious meaningful sum type. newtype EventCode EventCode :: Word16 -> EventCode -- | A direct representation of the value field of the C -- input_event, for when there is no obvious meaningful sum type. newtype EventValue EventValue :: Int32 -> EventValue -- | Generalisation of newDevice, in case one needs control over the -- file descriptor, e.g. in order to set a particular FileMode, -- OpenMode, or OpenFileFlags. Note that: -- --
--   newDevice path = newDeviceFromFd =<< openFd path ReadOnly Nothing defaultFileFlags
--   
-- -- WARNING: Don't attempt to reuse the Fd - it will be -- closed when the Device is garbage collected. newDeviceFromFd :: Fd -> IO Device -- | Get the next event from the device, if one is available. Designed for -- use with devices created from a non-blocking file descriptor. -- Otherwise equal to fmap Just . nextEvent. nextEventMay :: Device -> IO (Maybe Event) -- | LEDs values data LEDValue LedOn :: LEDValue LedOff :: LEDValue -- | Set the state of a LED on a device. setDeviceLED :: Device -> LEDEvent -> LEDValue -> IO () data CEvent CEvent :: Word16 -> Word16 -> Int32 -> CTimeVal -> CEvent [cEventType] :: CEvent -> Word16 [cEventCode] :: CEvent -> Word16 [cEventValue] :: CEvent -> Int32 [cEventTime] :: CEvent -> CTimeVal toCEvent :: Event -> CEvent fromCEvent :: CEvent -> Event toCEventData :: EventData -> (Word16, Word16, Int32) fromCEventData :: (Word16, Word16, Int32) -> EventData data CTimeVal CTimeVal :: Int64 -> Int64 -> CTimeVal [tvSec] :: CTimeVal -> Int64 [tvUsec] :: CTimeVal -> Int64 toCTimeVal :: DiffTime -> CTimeVal fromCTimeVal :: CTimeVal -> DiffTime instance GHC.Enum.Enum Evdev.EventCode instance GHC.Read.Read Evdev.EventCode instance GHC.Show.Show Evdev.EventCode instance GHC.Classes.Ord Evdev.EventCode instance GHC.Classes.Eq Evdev.EventCode instance GHC.Enum.Enum Evdev.EventValue instance GHC.Read.Read Evdev.EventValue instance GHC.Show.Show Evdev.EventValue instance GHC.Classes.Ord Evdev.EventValue instance GHC.Classes.Eq Evdev.EventValue instance GHC.Show.Show Evdev.KeyEvent instance GHC.Read.Read Evdev.KeyEvent instance GHC.Classes.Ord Evdev.KeyEvent instance GHC.Classes.Eq Evdev.KeyEvent instance GHC.Enum.Enum Evdev.KeyEvent instance GHC.Enum.Bounded Evdev.KeyEvent instance GHC.Read.Read Evdev.EventData instance GHC.Show.Show Evdev.EventData instance GHC.Classes.Ord Evdev.EventData instance GHC.Classes.Eq Evdev.EventData instance GHC.Read.Read Evdev.Event instance GHC.Show.Show Evdev.Event instance GHC.Classes.Ord Evdev.Event instance GHC.Classes.Eq Evdev.Event instance GHC.Show.Show Evdev.Device instance Util.CErrInfo Evdev.Device -- | Create virtual input devices. module Evdev.Uinput -- | A uinput device. data Device -- | Create a new uinput device. newDevice :: ByteString -> DeviceOpts -> IO Device -- | Write a single event. Doesn't issue a sync event, so: writeEvent -- dev e /= writeBatch dev [e]. writeEvent :: Device -> EventData -> IO () -- | Write several events followed by a SynReport. writeBatch :: Foldable t => Device -> t EventData -> IO () data DeviceOpts DeviceOpts :: Maybe ByteString -> Maybe ByteString -> Maybe Int -> Maybe Int -> Maybe Int -> Maybe Int -> [Key] -> [RelativeAxis] -> [(AbsoluteAxis, AbsInfo)] -> [MiscEvent] -> [SwitchEvent] -> [LEDEvent] -> [SoundEvent] -> [(RepeatEvent, Int)] -> [EventCode] -> [EventCode] -> [EventCode] -> DeviceOpts [phys] :: DeviceOpts -> Maybe ByteString [uniq] :: DeviceOpts -> Maybe ByteString [idProduct] :: DeviceOpts -> Maybe Int [idVendor] :: DeviceOpts -> Maybe Int [idBustype] :: DeviceOpts -> Maybe Int [idVersion] :: DeviceOpts -> Maybe Int [keys] :: DeviceOpts -> [Key] [relAxes] :: DeviceOpts -> [RelativeAxis] [absAxes] :: DeviceOpts -> [(AbsoluteAxis, AbsInfo)] [miscs] :: DeviceOpts -> [MiscEvent] [switchs] :: DeviceOpts -> [SwitchEvent] [leds] :: DeviceOpts -> [LEDEvent] [sounds] :: DeviceOpts -> [SoundEvent] [reps] :: DeviceOpts -> [(RepeatEvent, Int)] [ffs] :: DeviceOpts -> [EventCode] [powers] :: DeviceOpts -> [EventCode] [ffStats] :: DeviceOpts -> [EventCode] defaultDeviceOpts :: DeviceOpts -- | Make options for a device capable of precisely the events in the list. deviceOptsFromEvents :: Maybe (AbsoluteAxis -> AbsInfo) -> Maybe (RepeatEvent -> Int) -> [EventData] -> DeviceOpts deviceSyspath :: Device -> IO (Maybe ByteString) deviceDevnode :: Device -> IO (Maybe ByteString) data AbsInfo AbsInfo :: Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> AbsInfo [absValue] :: AbsInfo -> Int32 [absMinimum] :: AbsInfo -> Int32 [absMaximum] :: AbsInfo -> Int32 [absFuzz] :: AbsInfo -> Int32 [absFlat] :: AbsInfo -> Int32 [absResolution] :: AbsInfo -> Int32 -- | An input event, including the timestamp. data Event Event :: EventData -> DiffTime -> Event [eventData] :: Event -> EventData [eventTime] :: Event -> DiffTime -- | An input event, without the timestamp. Each constructor corresponds to -- one event type, except for UnknownEvent. data EventData SyncEvent :: SyncEvent -> EventData KeyEvent :: Key -> KeyEvent -> EventData RelativeEvent :: RelativeAxis -> EventValue -> EventData AbsoluteEvent :: AbsoluteAxis -> EventValue -> EventData MiscEvent :: MiscEvent -> EventValue -> EventData SwitchEvent :: SwitchEvent -> EventValue -> EventData LEDEvent :: LEDEvent -> EventValue -> EventData SoundEvent :: SoundEvent -> EventValue -> EventData RepeatEvent :: RepeatEvent -> EventValue -> EventData ForceFeedbackEvent :: EventCode -> EventValue -> EventData PowerEvent :: EventCode -> EventValue -> EventData ForceFeedbackStatusEvent :: EventCode -> EventValue -> EventData -- | We include this primarily so that fromCEvent can be -- well-defined - let us know if you ever actually see one emitted by a -- device, as it would likely indicate a shortcoming in the library. UnknownEvent :: Word16 -> EventCode -> EventValue -> EventData -- | The status of a key. data KeyEvent Released :: KeyEvent Pressed :: KeyEvent Repeated :: KeyEvent -- | A direct representation of the code field of the C -- input_event, for when there is no obvious meaningful sum type. newtype EventCode EventCode :: Word16 -> EventCode -- | A direct representation of the value field of the C -- input_event, for when there is no obvious meaningful sum type. newtype EventValue EventValue :: Int32 -> EventValue