A set of bit-flags to indicate the state of modifier keys and mouse buttons in various event types. Typical modifier keys are Shift, Control, Meta, Super, Hyper, Alt, Compose, Apple, CapsLock or ShiftLock.
Like the X Window System, GDK supports 8 modifier keys and 5 mouse buttons.
Value | Symbolic name | Description |
1 | Gdk::SHIFT_MASK | The Shift key. |
2 | Gdk::LOCK_MASK | A Lock key (depending on the modifier mapping of the X server this may either be CapsLock or ShiftLock). |
4 | Gdk::CONTROL_MASK | The Control key. |
8 | Gdk::MOD1_MASK | The fourth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier, but normally it is the Alt key). |
16 | Gdk::MOD2_MASK | The fifth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). |
32 | Gdk::MOD3_MASK | The sixth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). |
64 | Gdk::MOD4_MASK | The seventh modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). |
128 | Gdk::MOD5_MASK | The eighth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). |
256 | Gdk::BUTTON1_MASK | The first mouse button. |
512 | Gdk::BUTTON2_MASK | The second mouse button. |
1024 | Gdk::BUTTON3_MASK | The third mouse button. |
2048 | Gdk::BUTTON4_MASK | The fourth mouse button. |
4096 | Gdk::BUTTON5_MASK | The fifth mouse button. |
1073741824 | Gdk::RELEASE_MASK | Not used in GDK itself. GTK+ uses it to differentiate between (keyval, modifiers) pairs from key press and release events. |
1073750015 | Gdk::MODIFIER_MASK |