Crystal Space: iutil/evdefs.h File Reference (Crystal Space Public API Reference)

| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# iutil/evdefs.h File Reference

Event system related interfaces. More...

Go to the source code of this file.

## Classes
struct | _csKeyModifiers
| Flags for all currently pressed modifiers. More...
## Event class masks
Every event plug should provide information about which event types that may conflict with other event plugs it is able to generate. The system driver checks it and if several event plugs generates conflicting types events, one of them (the one with lower priority) is disabled. Todo: : this should be replaced with something better. I think we can accomplish the same thing using the event namespace: no two suppliers can overlap in the event tree. More expressive, more flexible, and doesn't lose anything we've got now.
#define | CSEVTYPE_Joystick 0x00000004
| Joystick events.
#define | CSEVTYPE_Keyboard 0x00000001
| Keyboard events.
#define | CSEVTYPE_Mouse 0x00000002
| Mouse events.
## Control key codes
Not every existing key on any existing platform is supported by Crystal Space. Instead, we tried to list here all the keys that are common among all platforms on which Crystal Space runs. There may still be some keys that aren't supported on some platforms, tho. Be aware that the range of the special keys has been arbitrarily, but careful chosen. In particular, all special keys fall into a part of the Unicode "Supplementary Private Use Area-B", so all keycodes in CS are always valid Unicode codepoints.
#define | CSKEY_ALT CSKEY_ALT_NUM(csKeyModifierNumAny)
| Undistinguished Alt.
#define | CSKEY_ALT_FIRST CSKEY_ALT_NUM(0)
| Lowest code of the Alt modifier keys.
#define | CSKEY_ALT_LAST CSKEY_ALT_NUM(0x1e)
| Highest code of the Alt modifier keys.
#define | CSKEY_ALT_LEFT CSKEY_ALT_NUM(csKeyModifierNumLeft)
| Left Alt.
#define | CSKEY_ALT_NUM(n) CSKEY_MODIFIER(csKeyModifierTypeAlt,n)
| Construct a key code for the Alt modifier key number n.
#define | CSKEY_ALT_RIGHT CSKEY_ALT_NUM(csKeyModifierNumRight)
| Right Alt.
#define | CSKEY_BACKSPACE '\b'
| Back-space key.
#define | CSKEY_CAPSLOCK CSKEY_MODIFIER(csKeyModifierTypeCapsLock,csKeyModifierNumAny)
| CapsLock key.
#define | CSKEY_CENTER CSKEY_PAD5
| Keypad "Center" (5).
#define | CSKEY_CONTEXT CSKEY_SPECIAL(0x0a)
| The "Context menu" key on Windows keyboards.
#define | CSKEY_CTRL CSKEY_CTRL_NUM(csKeyModifierNumAny)
| Undistinguished Ctrl.
#define | CSKEY_CTRL_FIRST CSKEY_CTRL_NUM(0)
| Lowest code of the Ctrl modifier keys.
#define | CSKEY_CTRL_LAST CSKEY_CTRL_NUM(0x1e)
| Highest code of the Ctrl modifier keys.
#define | CSKEY_CTRL_LEFT CSKEY_CTRL_NUM(csKeyModifierNumLeft)
| Left Ctrl.
#define | CSKEY_CTRL_NUM(n) CSKEY_MODIFIER(csKeyModifierTypeCtrl,n)
| Construct a key code for the Ctrl modifier key number n.
#define | CSKEY_CTRL_RIGHT CSKEY_CTRL_NUM(csKeyModifierNumRight)
| Right Ctrl.
#define | CSKEY_DEL CSKEY_SPECIAL(0x09)
| Delete key.
#define | CSKEY_DOWN CSKEY_SPECIAL(0x01)
| Down arrow key.
#define | CSKEY_END CSKEY_SPECIAL(0x07)
| End key.
#define | CSKEY_ENTER '\n'
| Enter key.
#define | CSKEY_ESC 27
| ESCape key.
#define | CSKEY_F1 CSKEY_SPECIAL(0x10)
| Function key F1.
#define | CSKEY_F10 CSKEY_SPECIAL(0x19)
| Function key F10.
#define | CSKEY_F11 CSKEY_SPECIAL(0x1a)
| Function key F11.
#define | CSKEY_F12 CSKEY_SPECIAL(0x1b)
| Function key F12.
#define | CSKEY_F2 CSKEY_SPECIAL(0x11)
| Function key F2.
#define | CSKEY_F3 CSKEY_SPECIAL(0x12)
| Function key F3.
#define | CSKEY_F4 CSKEY_SPECIAL(0x13)
| Function key F4.
#define | CSKEY_F5 CSKEY_SPECIAL(0x14)
| Function key F5.
#define | CSKEY_F6 CSKEY_SPECIAL(0x15)
| Function key F6.
#define | CSKEY_F7 CSKEY_SPECIAL(0x16)
| Function key F7.
#define | CSKEY_F8 CSKEY_SPECIAL(0x17)
| Function key F8.
#define | CSKEY_F9 CSKEY_SPECIAL(0x18)
| Function key F9.
#define | CSKEY_HOME CSKEY_SPECIAL(0x06)
| Home key.
#define | CSKEY_INS CSKEY_SPECIAL(0x08)
| Insert key.
#define | CSKEY_IS_MODIFIER(rawCode)
| Helper macro to test whether a key code identifies a modifier.
#define | CSKEY_IS_PAD_KEY(rawCode) (((rawCode) & CSKEY_PAD_FLAG) != 0)
| Helper macro to test whether a key code identifies a keypad key.
#define | CSKEY_IS_SPECIAL(rawCode) ((rawCode >= CSKEY_SPECIAL_FIRST) && ((rawCode) <= CSKEY_SPECIAL_LAST))
| Helper macro to determine whether a key code identifies a special key.
#define | CSKEY_LEFT CSKEY_SPECIAL(0x02)
| Left arrow key.
#define | CSKEY_MODIFIER(type, num) CSKEY_SPECIAL(CSKEY_MODIFIER_FIRST + ((type) << CSKEY_MODIFIERTYPE_SHIFT) + (num))
| Helper macro to construct a modifiers key code.
#define | CSKEY_MODIFIER_COMPARE_CODE(key1, key2)
| Helper macro to determine if two modifier key codes can be considered equal.
#define | CSKEY_MODIFIER_COMPARE_MASK(bitmask1, bitmask2)
| Helper macro to determine if two modifier bitmasks can be considered equal.
#define | CSKEY_MODIFIER_FIRST 0x2000
| The lowest code of a modifier key.
#define | CSKEY_MODIFIER_LAST 0x3fff
| The highest code of a modifier key.
#define | CSKEY_MODIFIER_NUM(rawCode)
| Helper macro to determine the modifier number of a key code.
#define | CSKEY_MODIFIER_TYPE(rawCode)
| Helper macro to determine the modifier type of a key code.
#define | CSKEY_MODIFIERTYPE_SHIFT 5
| Undistinguished Alt.
#define | CSKEY_PAD0 CSKEY_PAD_KEY('0')
| Keypad 0.
#define | CSKEY_PAD1 CSKEY_PAD_KEY('1')
| Keypad 1.
#define | CSKEY_PAD2 CSKEY_PAD_KEY('2')
| Keypad 2.
#define | CSKEY_PAD3 CSKEY_PAD_KEY('3')
| Keypad 3.
#define | CSKEY_PAD4 CSKEY_PAD_KEY('4')
| Keypad 4.
#define | CSKEY_PAD5 CSKEY_PAD_KEY('5')
| Keypad 5.
#define | CSKEY_PAD6 CSKEY_PAD_KEY('6')
| Keypad 6.
#define | CSKEY_PAD7 CSKEY_PAD_KEY('7')
| Keypad 7.
#define | CSKEY_PAD8 CSKEY_PAD_KEY('8')
| Keypad 8.
#define | CSKEY_PAD9 CSKEY_PAD_KEY('9')
| Keypad 9.
#define | CSKEY_PAD_FLAG 0x4000
| Bit that is set if a key is from the keypad.
#define | CSKEY_PAD_KEY(code) CSKEY_SPECIAL((unsigned int)(code) | CSKEY_PAD_FLAG)
| Helper macro to construct a keypade key code.
#define | CSKEY_PAD_TO_NORMAL(rawCode) ((rawCode) & (~CSKEY_PAD_FLAG))
| Helper macro to convert a 'pad' key code into a 'normal' special key code.
#define | CSKEY_PADDECIMAL CSKEY_PAD_KEY('.')
| Keypad Decimal ('.' on English keyboards).
#define | CSKEY_PADDIV CSKEY_PAD_KEY('/')
| Keypad Divide.
#define | CSKEY_PADENTER CSKEY_PAD_KEY('\n')
| Keypad Enter.
#define | CSKEY_PADMINUS CSKEY_PAD_KEY('-')
| Keypad Minus.
#define | CSKEY_PADMULT CSKEY_PAD_KEY('*')
| Keypad Multiply.
#define | CSKEY_PADNUM CSKEY_MODIFIER(csKeyModifierTypeNumLock,csKeyModifierNumAny) | CSKEY_PAD_FLAG
| NumLock key.
#define | CSKEY_PADPLUS CSKEY_PAD_KEY('+')
| Keypad Plus.
#define | CSKEY_PAUSE CSKEY_SPECIAL(0x0c)
| The Pause key.
#define | CSKEY_PGDN CSKEY_SPECIAL(0x05)
| PageDown key.
#define | CSKEY_PGUP CSKEY_SPECIAL(0x04)
| PageUp key.
#define | CSKEY_PRINTSCREEN CSKEY_SPECIAL(0x0b)
| The Print Screen key.
#define | CSKEY_RIGHT CSKEY_SPECIAL(0x03)
| Right arrow key.
#define | CSKEY_SCROLLLOCK CSKEY_MODIFIER(csKeyModifierTypeScrollLock,csKeyModifierNumAny)
| ScrollLock key.
#define | CSKEY_SHIFT CSKEY_SHIFT_NUM(csKeyModifierNumAny)
| Undistinguished Shift.
#define | CSKEY_SHIFT_FIRST CSKEY_SHIFT_NUM(0)
| Lowest code of the Shift modifier keys.
#define | CSKEY_SHIFT_LAST CSKEY_SHIFT_NUM(0x1e)
| Highest code of the Shift modifier keys.
#define | CSKEY_SHIFT_LEFT CSKEY_SHIFT_NUM(csKeyModifierNumLeft)
| Left Shift.
#define | CSKEY_SHIFT_NUM(n) CSKEY_MODIFIER(csKeyModifierTypeShift,n)
| Construct a key code for the Shift modifier key number n.
#define | CSKEY_SHIFT_RIGHT CSKEY_SHIFT_NUM(csKeyModifierNumRight)
| Right Shift.
#define | CSKEY_SPACE ' '
| Space key.
#define | CSKEY_SPECIAL(code) (CSKEY_SPECIAL_FIRST + (code))
| Helper macro to construct a special key code.
#define | CSKEY_SPECIAL_FIRST 0x108000
| The lowest code of a special key.
#define | CSKEY_SPECIAL_LAST 0x10fffd
| The highest code of a special key.
#define | CSKEY_SPECIAL_NUM(rawCode) ((rawCode) - CSKEY_SPECIAL_FIRST)
| Helper macro to determine the parameter that was given to CSKEY_SPECIAL.
#define | CSKEY_TAB '\t'
| Tab key.
#define | CSKEY_UP CSKEY_SPECIAL(0x00)
| Up arrow key.
typedef enum _csKeyCharType | csKeyCharType
| Character types.
enum | _csKeyCharType { csKeyCharTypeNormal = 0, csKeyCharTypeDead }
| Character types. More...
## Modifier key masks
csKeyEventHelper::GetModifiersBits() returns such a bitfields consisting of any combination of the masks below. Having one in one of the bits means that the corresponding modifier was pressed in the modifier state passed in.
#define | CSMASK_ALLMODIFIERS
| All modifiers, shift and lock types.
#define | CSMASK_ALLSHIFTS (CSMASK_SHIFT | CSMASK_CTRL | CSMASK_ALT)
| All shift keys.
#define | CSMASK_ALT (1 << csKeyModifierTypeAlt)
| "Alt" key mask
#define | CSMASK_CAPSLOCK (1 << csKeyModifierTypeCapsLock)
| "CapsLock" key mask
#define | CSMASK_CTRL (1 << csKeyModifierTypeCtrl)
| "Ctrl" key mask
#define | CSMASK_NUMLOCK (1 << csKeyModifierTypeNumLock)
| "NumLock" key mask
#define | CSMASK_SCROLLLOCK (1 << csKeyModifierTypeScrollLock)
| "ScrollLock" key mask
#define | CSMASK_SHIFT (1 << csKeyModifierTypeShift)
| "Shift" key mask
## Modifier keys
See also: Keyboard events, Modifier key masks
typedef enum _csKeyModifierNumType | csKeyModifierNumType
| Modifier numbers.
typedef _csKeyModifiers | csKeyModifiers
| Flags for all currently pressed modifiers.
typedef enum _csKeyModifierType | csKeyModifierType
| Modifier types.
enum | _csKeyModifierNumType { csKeyModifierNumLeft = 0, csKeyModifierNumRight, csKeyModifierNumAny = 0x1f }
| Modifier numbers. More...
enum | _csKeyModifierType { csKeyModifierTypeShift = 0, csKeyModifierTypeCtrl, csKeyModifierTypeAlt, csKeyModifierTypeCapsLock, csKeyModifierTypeNumLock, csKeyModifierTypeScrollLock }
| Modifier types. More...
## Typedefs
typedef enum _csKeyEventType | csKeyEventType
| Keyboard event type - stored as keyEventType attribute in keyboard events.
typedef enum _csMouseEventType | csMouseEventType
| Mouse event type - stored as mEventType attribute in mouse events.
## Enumerations
enum | _csKeyEventType { csKeyEventTypeUp = 0, csKeyEventTypeDown }
| Keyboard event type - stored as keyEventType attribute in keyboard events. More...
enum | _csMouseEventType { csMouseEventTypeMove = 0, csMouseEventTypeUp, csMouseEventTypeDown, csMouseEventTypeClick, csMouseEventTypeDoubleClick }
| Mouse event type - stored as mEventType attribute in mouse events. More...
enum | csMouseButton { csmbNone = -1, csmbLeft = 0, csmbRight = 1, csmbMiddle = 2, csmbWheelUp = 3, csmbWheelDown = 4, csmbExtra1 = 5, csmbExtra2 = 6 }
| Constants for mouse buttons. More...

## Detailed Description

Event system related interfaces.

Definition in file evdefs.h.

## Define Documentation

#define CSEVTYPE_Joystick 0x00000004

Joystick events.

Definition at line 441 of file evdefs.h.

#define CSEVTYPE_Keyboard 0x00000001

Keyboard events.

Definition at line 437 of file evdefs.h.

Referenced by csGraphics2DGLCommon::GetPotentiallyConflictingEvents().

#define CSEVTYPE_Mouse 0x00000002

Mouse events.

Definition at line 439 of file evdefs.h.

Referenced by csGraphics2DGLCommon::GetPotentiallyConflictingEvents().

#define CSKEY_ALT CSKEY_ALT_NUM(csKeyModifierNumAny)

Undistinguished Alt.

Definition at line 351 of file evdefs.h.

#define CSKEY_ALT_FIRST CSKEY_ALT_NUM(0)

Lowest code of the Alt modifier keys.

Definition at line 342 of file evdefs.h.

#define CSKEY_ALT_LAST CSKEY_ALT_NUM(0x1e)

Highest code of the Alt modifier keys.

Definition at line 344 of file evdefs.h.

#define CSKEY_ALT_LEFT CSKEY_ALT_NUM(csKeyModifierNumLeft)

Left Alt.

Definition at line 347 of file evdefs.h.

#define CSKEY_ALT_NUM | ( | n |  | ) | CSKEY_MODIFIER(csKeyModifierTypeAlt,n)

Construct a key code for the Alt modifier key number n.

Definition at line 340 of file evdefs.h.

#define CSKEY_ALT_RIGHT CSKEY_ALT_NUM(csKeyModifierNumRight)

Right Alt.

Definition at line 349 of file evdefs.h.

#define CSKEY_BACKSPACE '\b'

Back-space key.

Definition at line 202 of file evdefs.h.

#define CSKEY_CAPSLOCK CSKEY_MODIFIER(csKeyModifierTypeCapsLock,csKeyModifierNumAny)

CapsLock key.

Definition at line 407 of file evdefs.h.

#define CSKEY_CENTER CSKEY_PAD5

Keypad "Center" (5).

Definition at line 376 of file evdefs.h.

#define CSKEY_CONTEXT CSKEY_SPECIAL(0x0a)

The "Context menu" key on Windows keyboards.

Definition at line 239 of file evdefs.h.

#define CSKEY_CTRL CSKEY_CTRL_NUM(csKeyModifierNumAny)

Undistinguished Ctrl.

Definition at line 337 of file evdefs.h.

#define CSKEY_CTRL_FIRST CSKEY_CTRL_NUM(0)

Lowest code of the Ctrl modifier keys.

Definition at line 328 of file evdefs.h.

#define CSKEY_CTRL_LAST CSKEY_CTRL_NUM(0x1e)

Highest code of the Ctrl modifier keys.

Definition at line 330 of file evdefs.h.

#define CSKEY_CTRL_LEFT CSKEY_CTRL_NUM(csKeyModifierNumLeft)

Left Ctrl.

Definition at line 333 of file evdefs.h.

#define CSKEY_CTRL_NUM | ( | n |  | ) | CSKEY_MODIFIER(csKeyModifierTypeCtrl,n)

Construct a key code for the Ctrl modifier key number n.

Definition at line 326 of file evdefs.h.

#define CSKEY_CTRL_RIGHT CSKEY_CTRL_NUM(csKeyModifierNumRight)

Right Ctrl.

Definition at line 335 of file evdefs.h.

#define CSKEY_DEL CSKEY_SPECIAL(0x09)

Delete key.

Definition at line 237 of file evdefs.h.

#define CSKEY_DOWN CSKEY_SPECIAL(0x01)

Down arrow key.

Definition at line 221 of file evdefs.h.

#define CSKEY_END CSKEY_SPECIAL(0x07)

End key.

Definition at line 233 of file evdefs.h.

#define CSKEY_ENTER '\n'

Enter key.

Definition at line 198 of file evdefs.h.

#define CSKEY_ESC 27

ESCape key.

Definition at line 196 of file evdefs.h.

#define CSKEY_F1 CSKEY_SPECIAL(0x10)

Function key F1.

Definition at line 245 of file evdefs.h.

#define CSKEY_F10 CSKEY_SPECIAL(0x19)

Function key F10.

Definition at line 263 of file evdefs.h.

#define CSKEY_F11 CSKEY_SPECIAL(0x1a)

Function key F11.

Definition at line 265 of file evdefs.h.

#define CSKEY_F12 CSKEY_SPECIAL(0x1b)

Function key F12.

Definition at line 267 of file evdefs.h.

#define CSKEY_F2 CSKEY_SPECIAL(0x11)

Function key F2.

Definition at line 247 of file evdefs.h.

#define CSKEY_F3 CSKEY_SPECIAL(0x12)

Function key F3.

Definition at line 249 of file evdefs.h.

#define CSKEY_F4 CSKEY_SPECIAL(0x13)

Function key F4.

Definition at line 251 of file evdefs.h.

#define CSKEY_F5 CSKEY_SPECIAL(0x14)

Function key F5.

Definition at line 253 of file evdefs.h.

#define CSKEY_F6 CSKEY_SPECIAL(0x15)

Function key F6.

Definition at line 255 of file evdefs.h.

#define CSKEY_F7 CSKEY_SPECIAL(0x16)

Function key F7.

Definition at line 257 of file evdefs.h.

#define CSKEY_F8 CSKEY_SPECIAL(0x17)

Function key F8.

Definition at line 259 of file evdefs.h.

#define CSKEY_F9 CSKEY_SPECIAL(0x18)

Function key F9.

Definition at line 261 of file evdefs.h.

#define CSKEY_HOME CSKEY_SPECIAL(0x06)

Home key.

Definition at line 231 of file evdefs.h.

#define CSKEY_INS CSKEY_SPECIAL(0x08)

Insert key.

Definition at line 235 of file evdefs.h.

#define CSKEY_IS_MODIFIER | ( | rawCode |  | ) |

Value:

    (CSKEY_IS_SPECIAL(rawCode) &&   \
        ((CSKEY_SPECIAL_NUM(rawCode) >= CSKEY_MODIFIER_FIRST) && \
         (CSKEY_SPECIAL_NUM(rawCode) <= CSKEY_MODIFIER_LAST)))

Helper macro to test whether a key code identifies a modifier.

Definition at line 282 of file evdefs.h.

#define CSKEY_IS_PAD_KEY | ( | rawCode |  | ) | (((rawCode) & CSKEY_PAD_FLAG) != 0)

Helper macro to test whether a key code identifies a keypad key.

Definition at line 359 of file evdefs.h.

#define CSKEY_IS_SPECIAL | ( | rawCode |  | ) | ((rawCode >= CSKEY_SPECIAL_FIRST) && ((rawCode) <= CSKEY_SPECIAL_LAST))

Helper macro to determine whether a key code identifies a special key.

Definition at line 213 of file evdefs.h.

#define CSKEY_LEFT CSKEY_SPECIAL(0x02)

Left arrow key.

Definition at line 223 of file evdefs.h.

#define CSKEY_MODIFIER | ( | type,
|  | num |  | ) | CSKEY_SPECIAL(CSKEY_MODIFIER_FIRST + ((type) << CSKEY_MODIFIERTYPE_SHIFT) + (num))

Helper macro to construct a modifiers key code.

Definition at line 279 of file evdefs.h.

#define CSKEY_MODIFIER_COMPARE_CODE | ( | key1,
|  | key2 |  | ) |

Value:

    ((CSKEY_MODIFIER_TYPE (key1) == CSKEY_MODIFIER_TYPE (key2))                  \
      && ((CSKEY_MODIFIER_NUM(key1) == csKeyModifierNumAny)                      \
        || (CSKEY_MODIFIER_NUM(key2) == csKeyModifierNumAny)                     \
        || (CSKEY_MODIFIER_NUM(key1) == CSKEY_MODIFIER_NUM(key1))))

Helper macro to determine if two modifier key codes can be considered equal.

Remarks:
  Only works right if CSKEY_IS_MODIFIER() is true for both key codes.

Definition at line 305 of file evdefs.h.

#define CSKEY_MODIFIER_COMPARE_MASK | ( | bitmask1,
|  | bitmask2 |  | ) |

Value:

    ((bitmask1) == (bitmask2)                                                    \
    || ((bitmask1) == (unsigned)(1 << csKeyModifierNumAny) && (bitmask2) != 0)   \
    || ((bitmask2) == (unsigned)(1 << csKeyModifierNumAny) && (bitmask1) != 0))

Helper macro to determine if two modifier bitmasks can be considered equal.

Definition at line 296 of file evdefs.h.

#define CSKEY_MODIFIER_FIRST 0x2000

The lowest code of a modifier key.

Definition at line 270 of file evdefs.h.

#define CSKEY_MODIFIER_LAST 0x3fff

The highest code of a modifier key.

Definition at line 272 of file evdefs.h.

#define CSKEY_MODIFIER_NUM | ( | rawCode |  | ) |

Value:

    (((rawCode) - CSKEY_MODIFIER_FIRST - CSKEY_SPECIAL_FIRST) & \
      ((1 << CSKEY_MODIFIERTYPE_SHIFT) - 1))

Helper macro to determine the modifier number of a key code.

Definition at line 291 of file evdefs.h.

#define CSKEY_MODIFIER_TYPE | ( | rawCode |  | ) |

Value:

    (((rawCode) - CSKEY_MODIFIER_FIRST - CSKEY_SPECIAL_FIRST) >> \
      CSKEY_MODIFIERTYPE_SHIFT)

Helper macro to determine the modifier type of a key code.

Definition at line 287 of file evdefs.h.

#define CSKEY_MODIFIERTYPE_SHIFT 5

Undistinguished Alt.

Definition at line 277 of file evdefs.h.

#define CSKEY_PAD0 CSKEY_PAD_KEY('0')

Keypad 0.

Definition at line 386 of file evdefs.h.

#define CSKEY_PAD1 CSKEY_PAD_KEY('1')

Keypad 1.

Definition at line 366 of file evdefs.h.

#define CSKEY_PAD2 CSKEY_PAD_KEY('2')

Keypad 2.

Definition at line 368 of file evdefs.h.

#define CSKEY_PAD3 CSKEY_PAD_KEY('3')

Keypad 3.

Definition at line 370 of file evdefs.h.

#define CSKEY_PAD4 CSKEY_PAD_KEY('4')

Keypad 4.

Definition at line 372 of file evdefs.h.

#define CSKEY_PAD5 CSKEY_PAD_KEY('5')

Keypad 5.

Definition at line 374 of file evdefs.h.

#define CSKEY_PAD6 CSKEY_PAD_KEY('6')

Keypad 6.

Definition at line 378 of file evdefs.h.

#define CSKEY_PAD7 CSKEY_PAD_KEY('7')

Keypad 7.

Definition at line 380 of file evdefs.h.

#define CSKEY_PAD8 CSKEY_PAD_KEY('8')

Keypad 8.

Definition at line 382 of file evdefs.h.

#define CSKEY_PAD9 CSKEY_PAD_KEY('9')

Keypad 9.

Definition at line 384 of file evdefs.h.

#define CSKEY_PAD_FLAG 0x4000

Bit that is set if a key is from the keypad.

Definition at line 354 of file evdefs.h.

#define CSKEY_PAD_KEY | ( | code |  | ) | CSKEY_SPECIAL((unsigned int)(code) | CSKEY_PAD_FLAG)

Helper macro to construct a keypade key code.

Definition at line 356 of file evdefs.h.

#define CSKEY_PAD_TO_NORMAL | ( | rawCode |  | ) | ((rawCode) & (~CSKEY_PAD_FLAG))

Helper macro to convert a 'pad' key code into a 'normal' special key code.

Definition at line 363 of file evdefs.h.

#define CSKEY_PADDECIMAL CSKEY_PAD_KEY('.')

Keypad Decimal ('.' on English keyboards).

Definition at line 388 of file evdefs.h.

#define CSKEY_PADDIV CSKEY_PAD_KEY('/')

Keypad Divide.

Definition at line 390 of file evdefs.h.

#define CSKEY_PADENTER CSKEY_PAD_KEY('\n')

Keypad Enter.

Definition at line 398 of file evdefs.h.

#define CSKEY_PADMINUS CSKEY_PAD_KEY('-')

Keypad Minus.

Definition at line 394 of file evdefs.h.

#define CSKEY_PADMULT CSKEY_PAD_KEY('*')

Keypad Multiply.

Definition at line 392 of file evdefs.h.

#define CSKEY_PADNUM CSKEY_MODIFIER(csKeyModifierTypeNumLock,csKeyModifierNumAny) | CSKEY_PAD_FLAG

NumLock key.

Both a modifier and a keypad key.

Definition at line 404 of file evdefs.h.

#define CSKEY_PADPLUS CSKEY_PAD_KEY('+')

Keypad Plus.

Definition at line 396 of file evdefs.h.

#define CSKEY_PAUSE CSKEY_SPECIAL(0x0c)

The Pause key.

Definition at line 243 of file evdefs.h.

#define CSKEY_PGDN CSKEY_SPECIAL(0x05)

PageDown key.

Definition at line 229 of file evdefs.h.

#define CSKEY_PGUP CSKEY_SPECIAL(0x04)

PageUp key.

Definition at line 227 of file evdefs.h.

#define CSKEY_PRINTSCREEN CSKEY_SPECIAL(0x0b)

The Print Screen key.

Definition at line 241 of file evdefs.h.

#define CSKEY_RIGHT CSKEY_SPECIAL(0x03)

Right arrow key.

Definition at line 225 of file evdefs.h.

#define CSKEY_SCROLLLOCK CSKEY_MODIFIER(csKeyModifierTypeScrollLock,csKeyModifierNumAny)

ScrollLock key.

Definition at line 410 of file evdefs.h.

#define CSKEY_SHIFT CSKEY_SHIFT_NUM(csKeyModifierNumAny)

Undistinguished Shift.

Definition at line 323 of file evdefs.h.

#define CSKEY_SHIFT_FIRST CSKEY_SHIFT_NUM(0)

Lowest code of the Shift modifier keys.

Definition at line 314 of file evdefs.h.

#define CSKEY_SHIFT_LAST CSKEY_SHIFT_NUM(0x1e)

Highest code of the Shift modifier keys.

Definition at line 316 of file evdefs.h.

#define CSKEY_SHIFT_LEFT CSKEY_SHIFT_NUM(csKeyModifierNumLeft)

Left Shift.

Definition at line 319 of file evdefs.h.

#define CSKEY_SHIFT_NUM | ( | n |  | ) | CSKEY_MODIFIER(csKeyModifierTypeShift,n)

Construct a key code for the Shift modifier key number n.

Definition at line 312 of file evdefs.h.

#define CSKEY_SHIFT_RIGHT CSKEY_SHIFT_NUM(csKeyModifierNumRight)

Right Shift.

Definition at line 321 of file evdefs.h.

#define CSKEY_SPACE ' '

Space key.

Definition at line 204 of file evdefs.h.

#define CSKEY_SPECIAL | ( | code |  | ) | (CSKEY_SPECIAL_FIRST + (code))

Helper macro to construct a special key code.

Definition at line 211 of file evdefs.h.

#define CSKEY_SPECIAL_FIRST 0x108000

The lowest code of a special key.

Definition at line 207 of file evdefs.h.

#define CSKEY_SPECIAL_LAST 0x10fffd

The highest code of a special key.

Definition at line 209 of file evdefs.h.

#define CSKEY_SPECIAL_NUM | ( | rawCode |  | ) | ((rawCode) - CSKEY_SPECIAL_FIRST)

Helper macro to determine the parameter that was given to CSKEY_SPECIAL.

Definition at line 216 of file evdefs.h.

#define CSKEY_TAB '\t'

Tab key.

Definition at line 200 of file evdefs.h.

#define CSKEY_UP CSKEY_SPECIAL(0x00)

Up arrow key.

Definition at line 219 of file evdefs.h.

#define CSMASK_ALLMODIFIERS

Value:

    (CSMASK_CAPSLOCK | CSMASK_NUMLOCK | \
                                     CSMASK_SCROLLLOCK | CSMASK_ALLSHIFTS)

All modifiers, shift and lock types.

Definition at line 180 of file evdefs.h.

#define CSMASK_ALLSHIFTS (CSMASK_SHIFT | CSMASK_CTRL | CSMASK_ALT)

All shift keys.

Definition at line 171 of file evdefs.h.

#define CSMASK_ALT (1 << csKeyModifierTypeAlt)

"Alt" key mask

Definition at line 169 of file evdefs.h.

#define CSMASK_CAPSLOCK (1 << csKeyModifierTypeCapsLock)

"CapsLock" key mask

Definition at line 174 of file evdefs.h.

#define CSMASK_CTRL (1 << csKeyModifierTypeCtrl)

"Ctrl" key mask

Definition at line 167 of file evdefs.h.

#define CSMASK_NUMLOCK (1 << csKeyModifierTypeNumLock)

"NumLock" key mask

Definition at line 176 of file evdefs.h.

#define CSMASK_SCROLLLOCK (1 << csKeyModifierTypeScrollLock)

"ScrollLock" key mask

Definition at line 178 of file evdefs.h.

#define CSMASK_SHIFT (1 << csKeyModifierTypeShift)

"Shift" key mask

Definition at line 165 of file evdefs.h.

## Typedef Documentation

typedef enum _csKeyCharType csKeyCharType

Character types.

typedef enum _csKeyModifierNumType csKeyModifierNumType

Modifier numbers.

typedef struct _csKeyModifiers csKeyModifiers

Flags for all currently pressed modifiers.

typedef enum _csKeyModifierType csKeyModifierType

Modifier types.

## Enumeration Type Documentation

enum _csKeyCharType

Character types.

Enumerator:

  csKeyCharTypeNormal | Normal character.
  csKeyCharTypeDead | "Dead" character

Definition at line 414 of file evdefs.h.

enum _csKeyModifierNumType

Modifier numbers.

Enumerator:

  csKeyModifierNumLeft | The default number for a 'left' version of a key.
  csKeyModifierNumRight | The default number for a 'right' version of a key.
  csKeyModifierNumAny | 'Magic' modifier number used if there shouldn't be distinguished between multiple modifier keys of the same type.

Definition at line 121 of file evdefs.h.

enum _csKeyModifierType

Modifier types.

Enumerator:

  csKeyModifierTypeShift | 'Shift' is held
  csKeyModifierTypeCtrl | 'Ctrl' is held
  csKeyModifierTypeAlt | 'Alt' is held
  csKeyModifierTypeCapsLock | 'CapsLock' is toggled
  csKeyModifierTypeNumLock | 'NumLock' is toggled
  csKeyModifierTypeScrollLock | 'ScrollLock' is toggled

Definition at line 99 of file evdefs.h.