robot-1.4: Simulate keyboard and mouse events

Safe HaskellNone
LanguageHaskell98

Test.Robot.Types

Contents

Description

Defines the Switch type, along with some constants and utilities.

Synopsis

Types

data Switch Source

Either a key on the keyboard, or a mouse button or scroll wheel.

Note that the scroll wheel is treated as two mouse buttons: one scrolling up, and one scrolling down.

Constructors

Key KEYSYM 
Button BUTTON 

Defining your own keys

The Key constructor 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 Key 0x00a3.

Note: this feature only works if the key actually exists on your keyboard. If not, then using the result will raise an exception.

Constants

Buttons

Control sequences

Cursor control and motion

Miscellaneous functions

Keypad functions

Keypad numbers

Function keys

Modifiers

More modifiers

Letters, numbers and symbols