Copyright | (c) 2016-19 Brian W Bush |
---|---|
License | MIT |
Maintainer | Brian W Bush <code@functionally.io> |
Stability | Beta |
Portability | Portable |
Safe Haskell | None |
Language | Haskell2010 |
Event types.
- data Event
- = KeyEvent { }
- | SpecialKeyEvent {
- specialKey :: SpecialKey
- toggle :: Maybe Toggle
- modifiers :: Maybe Modifiers
- mousePosition :: Maybe (Double, Double)
- | MouseEvent {
- button :: ButtonState
- modifiers :: Maybe Modifiers
- mousePosition :: Maybe (Double, Double)
- | ButtonEvent { }
- | ButtonsEvent {
- buttons :: [ButtonState]
- | PositionEvent {
- mousePosition :: Maybe (Double, Double)
- | MotionEvent { }
- | RotationEvent { }
- | JoystickEvent { }
- | FingerEvent { }
- | PointerEvent {
- pointerPosition :: (Double, Double, Double)
- | AnalogEvent {
- axis :: Int
- analogValue :: Double
- | DialEvent { }
- | LocationEvent { }
- | OrientationEvent {
- orientation :: (Double, Double, Double, Double)
- | EventError { }
- data SpecialKey
- data Toggle
- data Modifiers = Modifiers {
- shiftModifier :: Bool
- ctrlModifier :: Bool
- altModifier :: Bool
- data Button
- type ButtonState = (Button, Toggle)
- data Hand
- data Finger
Types
An event.
KeyEvent | A character from a keyboard. |
SpecialKeyEvent | A special key from a keyboard. |
| |
MouseEvent | A button press on a mouse. |
| |
ButtonEvent | The press of of a button. |
| |
ButtonsEvent | The pressing of several buttons. |
| |
PositionEvent | The movement of a mouse. |
| |
MotionEvent | Motion. |
| |
RotationEvent | Rotation. |
| |
JoystickEvent | Joystick position. |
| |
FingerEvent | Moving a finger. |
PointerEvent | Moving a pointer. |
| |
AnalogEvent | An analog value. |
| |
DialEvent | A dial value. |
LocationEvent | Location in space. |
OrientationEvent | Orientation in space. |
| |
EventError | An error. |
data SpecialKey Source #
A special key.
KeyF1 | F1 |
KeyF2 | F2 |
KeyF3 | F3 |
KeyF4 | F4 |
KeyF5 | F5 |
KeyF6 | F6 |
KeyF7 | F7 |
KeyF8 | F8 |
KeyF9 | F9 |
KeyF10 | F10 |
KeyF11 | F11 |
KeyF12 | F12 |
KeyLeft | left arrow |
KeyUp | up arrow |
KeyRight | right arrow |
KeyDown | down arrow |
KeyPageUp | page up |
KeyPageDown | page down |
KeyHome | home |
KeyEnd | end |
KeyInsert | insert |
KeyNumLock | number lock |
KeyBegin | begin |
KeyDelete | delete |
KeyShiftL | left shift |
KeyShiftR | right shift |
KeyCtrlL | left control |
KeyCtrlR | right control |
KeyAltL | left alt |
KeyAltR | right alt |
KeyUnknown Int | unknown, with a specified index |
The state of a button.
Keyboard modifiers.
Modifiers | |
|
A button.
LeftButton | left mouse button |
MiddleButton | middle mouse button |
RightButton | right mouse button |
WheelUp | mouse wheel upward |
WheelDown | mouse wheel downward |
IndexButton Int | button specified by an index |
LetterButton Char | button specified by a letter |
type ButtonState = (Button, Toggle) Source #
A button and its state.
A hand.
A finger.
Thumb | thumb |
IndexFinger | first or index finger |
MiddleFinger | second or middle finger |
RingFinger | third of ring finger |
Pinky | fourth finger or pinky |