Crystal Space: _csKeyModifiers Struct Reference (Crystal Space Public API Reference)

| ## Public API Reference

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

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# _csKeyModifiers Struct Reference

Flags for all currently pressed modifiers. More...

`#include <iutil/evdefs.h>`

List of all members.

## Public Attributes
unsigned int | modifiers [csKeyModifierTypeLast]
| Bitmasks for different modifiers.

## Detailed Description

Flags for all currently pressed modifiers.

Definition at line 136 of file evdefs.h.

## Member Data Documentation

unsigned int _csKeyModifiers::modifiers[csKeyModifierTypeLast]

Bitmasks for different modifiers.

If the modifier number n was pressed, the nth bit is set.

Example - testing for a specific modifier:

     csKeyModifiers m;
     bool rightAlt = m.modifiers[csKeyModifierTypeAlt] &
       (1 << csKeyModifierNumRight);

Example - testing if any modifier of a type is pressed:

     csKeyModifiers m;
     bool ctrl = m.modifiers[csKeyModifierTypeAlt] != 0;

Definition at line 154 of file evdefs.h.

The documentation for this struct was generated from the following file:

- iutil/evdefs.h