Safe Haskell | None |
---|
- data Key
- data Button
- customKey :: KEYSYM -> Key
- customButton :: BUTTON -> Button
- rawKey :: Key -> KEYSYM
- rawButton :: Button -> BUTTON
- leftButton :: Button
- middleButton :: Button
- rightButton :: Button
- scrollUp :: Button
- scrollDown :: Button
- scrollLeft :: Button
- scrollRight :: Button
- backButton :: Button
- forwardButton :: Button
- _Backspace :: Key
- _Tab :: Key
- _LineFeed :: Key
- _Clear :: Key
- _Return :: Key
- _Pause :: Key
- _ScrollLock :: Key
- _SysReq :: Key
- _Escape :: Key
- _Delete :: Key
- _Home :: Key
- _Left :: Key
- _Up :: Key
- _Right :: Key
- _Down :: Key
- _Prior :: Key
- _PageUp :: Key
- _Next :: Key
- _PageDown :: Key
- _End :: Key
- _Begin :: Key
- _Select :: Key
- _Print :: Key
- _Execute :: Key
- _Insert :: Key
- _Undo :: Key
- _Redo :: Key
- _Menu :: Key
- _Find :: Key
- _Cancel :: Key
- _Help :: Key
- _Break :: Key
- _ModeSwitch :: Key
- _ScriptSwitch :: Key
- _NumLock :: Key
- _KP_Space :: Key
- _KP_Tab :: Key
- _KP_Enter :: Key
- _KP_F1 :: Key
- _KP_F2 :: Key
- _KP_F3 :: Key
- _KP_F4 :: Key
- _KP_Home :: Key
- _KP_Left :: Key
- _KP_Up :: Key
- _KP_Right :: Key
- _KP_Down :: Key
- _KP_Prior :: Key
- _KP_PageUp :: Key
- _KP_Next :: Key
- _KP_PageDown :: Key
- _KP_End :: Key
- _KP_Begin :: Key
- _KP_Insert :: Key
- _KP_Delete :: Key
- _KP_Multiply :: Key
- _KP_Add :: Key
- _KP_Separator :: Key
- _KP_Subtract :: Key
- _KP_Decimal :: Key
- _KP_Divide :: Key
- _KP_Equal :: Key
- _KP_0 :: Key
- _KP_1 :: Key
- _KP_2 :: Key
- _KP_3 :: Key
- _KP_4 :: Key
- _KP_5 :: Key
- _KP_6 :: Key
- _KP_7 :: Key
- _KP_8 :: Key
- _KP_9 :: Key
- _F1 :: Key
- _F2 :: Key
- _F3 :: Key
- _F4 :: Key
- _F5 :: Key
- _F6 :: Key
- _F7 :: Key
- _F8 :: Key
- _F9 :: Key
- _F10 :: Key
- _F11 :: Key
- _F12 :: Key
- _F13 :: Key
- _F14 :: Key
- _F15 :: Key
- _F16 :: Key
- _F17 :: Key
- _F18 :: Key
- _F19 :: Key
- _Shift :: Key
- _Shift_L :: Key
- _Shift_R :: Key
- _Ctrl :: Key
- _Control :: Key
- _Control_L :: Key
- _Control_R :: Key
- _CapsLock :: Key
- _ShiftLock :: Key
- _Meta :: Key
- _Meta_L :: Key
- _Meta_R :: Key
- _Alt :: Key
- _Alt_L :: Key
- _Alt_R :: Key
- _Super :: Key
- _Super_L :: Key
- _Super_R :: Key
- _Hyper :: Key
- _Hyper_L :: Key
- _Hyper_R :: Key
- _Space :: Key
- _Exclamation :: Key
- _Quotation :: Key
- _NumberSign :: Key
- _Dollar :: Key
- _Percent :: Key
- _Ampersand :: Key
- _Apostrophe :: Key
- _ParenLeft :: Key
- _ParenRight :: Key
- _Asterisk :: Key
- _Plus :: Key
- _Comma :: Key
- _Minus :: Key
- _Period :: Key
- _Slash :: Key
- _0 :: Key
- _1 :: Key
- _2 :: Key
- _3 :: Key
- _4 :: Key
- _5 :: Key
- _6 :: Key
- _7 :: Key
- _8 :: Key
- _9 :: Key
- _Colon :: Key
- _Semicolon :: Key
- _Less :: Key
- _Equal :: Key
- _Greater :: Key
- _Question :: Key
- _At :: Key
- _A :: Key
- _B :: Key
- _C :: Key
- _D :: Key
- _E :: Key
- _F :: Key
- _G :: Key
- _H :: Key
- _I :: Key
- _J :: Key
- _K :: Key
- _L :: Key
- _M :: Key
- _N :: Key
- _O :: Key
- _P :: Key
- _Q :: Key
- _R :: Key
- _S :: Key
- _T :: Key
- _U :: Key
- _V :: Key
- _W :: Key
- _X :: Key
- _Y :: Key
- _Z :: Key
- _BracketLeft :: Key
- _Backslash :: Key
- _BracketRight :: Key
- _Circumflex :: Key
- _Underscore :: Key
- _Grave :: Key
- _BraceLeft :: Key
- _Bar :: Key
- _BraceRight :: Key
- _Tilde :: Key
Types
A mouse button or scroll wheel.
Note that the scroll wheel is treated as two separate buttons: one scrolling up, and one scrolling down.
Creating
These two functions let you define your own keys and buttons.
customKey
requires a magic number (keysym) as its argument. On
most Unix systems, you can look up common keysyms in the file
/usr/include/X11/keysymdef.h
.
For example, the pound sign £
is listed as:
#define XK_sterling 0x00a3 /* U+00A3 POUND SIGN */
so to input this key, we use customKey 0x00a3
.
Note: this feature only works if the key actually exists on your keyboard. If not, then using the result will raise an exception.
customButton :: BUTTON -> ButtonSource