Copyright | (c) David Janssen 2019 |
---|---|
License | MIT |
Maintainer | janssen.dhj@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Keycode
s are represented as a large enum lining up the keycodes defined in the Linux headers.
Synopsis
- data Keycode
- = KeyReserved
- | KeyEsc
- | Key1
- | Key2
- | Key3
- | Key4
- | Key5
- | Key6
- | Key7
- | Key8
- | Key9
- | Key0
- | KeyMinus
- | KeyEqual
- | KeyBackspace
- | KeyTab
- | KeyQ
- | KeyW
- | KeyE
- | KeyR
- | KeyT
- | KeyY
- | KeyU
- | KeyI
- | KeyO
- | KeyP
- | KeyLeftBrace
- | KeyRightBrace
- | KeyEnter
- | KeyLeftCtrl
- | KeyA
- | KeyS
- | KeyD
- | KeyF
- | KeyG
- | KeyH
- | KeyJ
- | KeyK
- | KeyL
- | KeySemicolon
- | KeyApostrophe
- | KeyGrave
- | KeyLeftShift
- | KeyBackslash
- | KeyZ
- | KeyX
- | KeyC
- | KeyV
- | KeyB
- | KeyN
- | KeyM
- | KeyComma
- | KeyDot
- | KeySlash
- | KeyRightShift
- | KeyKpAsterisk
- | KeyLeftAlt
- | KeySpace
- | KeyCapsLock
- | KeyF1
- | KeyF2
- | KeyF3
- | KeyF4
- | KeyF5
- | KeyF6
- | KeyF7
- | KeyF8
- | KeyF9
- | KeyF10
- | KeyNumLock
- | KeyScrollLock
- | KeyKp7
- | KeyKp8
- | KeyKp9
- | KeyKpMinus
- | KeyKp4
- | KeyKp5
- | KeyKp6
- | KeyKpPlus
- | KeyKp1
- | KeyKp2
- | KeyKp3
- | KeyKp0
- | KeyKpDot
- | Missing84
- | KeyZenkakuHankaku
- | Key102nd
- | KeyF11
- | KeyF12
- | KeyRo
- | KeyKatakana
- | KeyHiragana
- | KeyHenkan
- | KeyKatakanaHiragana
- | KeyMuhenkan
- | KeyKpjpcomma
- | KeyKpEnter
- | KeyRightCtrl
- | KeyKpSlash
- | KeySysRq
- | KeyRightAlt
- | KeyLinefeed
- | KeyHome
- | KeyUp
- | KeyPageUp
- | KeyLeft
- | KeyRight
- | KeyEnd
- | KeyDown
- | KeyPageDown
- | KeyInsert
- | KeyDelete
- | KeyMacro
- | KeyMute
- | KeyVolumeDown
- | KeyVolumeUp
- | KeyPower
- | KeyKpEqual
- | KeyKpPlusMinus
- | KeyPause
- | KeyScale
- | KeyKpComma
- | KeyHangeul
- | KeyHanja
- | KeyYen
- | KeyLeftMeta
- | KeyRightMeta
- | KeyCompose
- | KeyStop
- | KeyAgain
- | KeyProps
- | KeyUndo
- | KeyFront
- | KeyCopy
- | KeyOpen
- | KeyPaste
- | KeyFind
- | KeyCut
- | KeyHelp
- | KeyMenu
- | KeyCalc
- | KeySetup
- | KeySleep
- | KeyWakeUp
- | KeyFile
- | KeySendFile
- | KeyDeleteFile
- | KeyXfer
- | KeyProg1
- | KeyProg2
- | KeyWww
- | KeyMsDos
- | KeyCoffee
- | KeyDirection
- | KeyCycleWindows
- | KeyMail
- | KeyBookmarks
- | KeyComputer
- | KeyBack
- | KeyForward
- | KeyCloseCd
- | KeyEjectCd
- | KeyEjectCloseCd
- | KeyNextSong
- | KeyPlayPause
- | KeyPreviousSong
- | KeyStopCd
- | KeyRecord
- | KeyRewind
- | KeyPhone
- | KeyIso
- | KeyConfig
- | KeyHomepage
- | KeyRefresh
- | KeyExit
- | KeyMove
- | KeyEdit
- | KeyScrollUp
- | KeyScrollDown
- | KeyKpLeftParen
- | KeyKpRightParen
- | KeyNew
- | KeyRedo
- | KeyF13
- | KeyF14
- | KeyF15
- | KeyF16
- | KeyF17
- | KeyF18
- | KeyF19
- | KeyF20
- | KeyF21
- | KeyF22
- | KeyF23
- | KeyF24
- | Missing195
- | Missing196
- | Missing197
- | Missing198
- | Missing199
- | KeyPlayCd
- | KeyPauseCd
- | KeyProg3
- | KeyProg4
- | KeyDashboard
- | KeySuspend
- | KeyClose
- | KeyPlay
- | KeyFastForward
- | KeyBassBoost
- | KeyPrint
- | KeyHp
- | KeyCamera
- | KeySound
- | KeyQuestion
- | KeyEmail
- | KeyChat
- | KeySearch
- | KeyConnect
- | KeyFinance
- | KeySport
- | KeyShop
- | KeyAlterase
- | KeyCancel
- | KeyBrightnessDown
- | KeyBrightnessUp
- | KeyMedia
- | KeySwitchVideoMode
- | KeyKbdIllumToggle
- | KeyKbdIllumDown
- | KeyKbdIllumUp
- | KeySend
- | KeyReply
- | KeyForwardMail
- | KeySave
- | KeyDocuments
- | KeyBattery
- | KeyBluetooth
- | KeyWlan
- | KeyUwb
- | KeyUnknown
- | KeyVideoNext
- | KeyVideoPrev
- | KeyBrightnessCycle
- | KeyBrightnessZero
- | KeyDisplayOff
- | KeyWimax
- | Missing247
- | Missing248
- | Missing249
- | Missing250
- | Missing251
- | Missing252
- | Missing253
- | Missing254
- | Missing255
- keyNames :: MultiMap Keycode Text
The core Keycode type
Keycode
s are defined as a large ADT that mimics the keycodes from the Linux
headers:
https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h.
Anywhere there are missing regions in the linux headers, we've defined
MissingXX
values for the ADT.
Calling toEnum
on a Linux keycode value should produce the
corresponding Keycode
value and vice-versa.