GdkModifierType

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. Since 2.10, GDK recognizes which of the Meta, Super or Hyper keys are mapped to Mod2 - Mod5, and indicates this by setting GDK_SUPER_MASK, GDK_HYPER_MASK or GDK_META_MASK in the state field of key events. Note that GDK may add internal values to events which include reserved values such as GDK_MODIFIER_RESERVED_13_MASK. Your code should preserve and ignore them. You can use GDK_MODIFIER_MASK to remove all reserved values. GDK_SHIFT_MASK the Shift key. GDK_LOCK_MASK a Lock key (depending on the modifier mapping of the X server this may either be CapsLock or ShiftLock). GDK_CONTROL_MASK the Control key. 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). GDK_MOD2_MASK the fifth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). GDK_MOD3_MASK the sixth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). GDK_MOD4_MASK the seventh modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). GDK_MOD5_MASK the eighth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier). GDK_BUTTON1_MASK the first mouse button. GDK_BUTTON2_MASK the second mouse button. GDK_BUTTON3_MASK the third mouse button. GDK_BUTTON4_MASK the fourth mouse button. GDK_BUTTON5_MASK the fifth mouse button. GDK_MODIFIER_RESERVED_13_MASK A reserved bit flag; do not use in your own code GDK_MODIFIER_RESERVED_14_MASK GDK_MODIFIER_RESERVED_15_MASK GDK_MODIFIER_RESERVED_16_MASK GDK_MODIFIER_RESERVED_17_MASK GDK_MODIFIER_RESERVED_18_MASK GDK_MODIFIER_RESERVED_19_MASK GDK_MODIFIER_RESERVED_20_MASK GDK_MODIFIER_RESERVED_21_MASK GDK_MODIFIER_RESERVED_22_MASK GDK_MODIFIER_RESERVED_23_MASK GDK_MODIFIER_RESERVED_24_MASK GDK_MODIFIER_RESERVED_25_MASK GDK_SUPER_MASK the Super modifier. Since 2.10 GDK_HYPER_MASK the Hyper modifier. Since 2.10 GDK_META_MASK the Meta modifier. Since 2.10 GDK_MODIFIER_RESERVED_29_MASK GDK_RELEASE_MASK not used in GDK itself. GTK+ uses it to differentiate between (keyval, modifiers) pairs from key press and release events. GDK_MODIFIER_MASK a mask covering all modifier types.

Values

ValueMeaning
SHIFT_MASK1 << 0
LOCK_MASK1 << 1
CONTROL_MASK1 << 2
MOD1_MASK1 << 3
MOD2_MASK1 << 4
MOD3_MASK1 << 5
MOD4_MASK1 << 6
MOD5_MASK1 << 7
BUTTON1_MASK1 << 8
BUTTON2_MASK1 << 9
BUTTON3_MASK1 << 10
BUTTON4_MASK1 << 11
BUTTON5_MASK1 << 12
MODIFIER_RESERVED_13_MASK1 << 13
MODIFIER_RESERVED_14_MASK1 << 14
MODIFIER_RESERVED_15_MASK1 << 15
MODIFIER_RESERVED_16_MASK1 << 16
MODIFIER_RESERVED_17_MASK1 << 17
MODIFIER_RESERVED_18_MASK1 << 18
MODIFIER_RESERVED_19_MASK1 << 19
MODIFIER_RESERVED_20_MASK1 << 20
MODIFIER_RESERVED_21_MASK1 << 21
MODIFIER_RESERVED_22_MASK1 << 22
MODIFIER_RESERVED_23_MASK1 << 23
MODIFIER_RESERVED_24_MASK1 << 24
MODIFIER_RESERVED_25_MASK1 << 25
SUPER_MASK1 << 26
HYPER_MASK1 << 27
META_MASK1 << 28
MODIFIER_RESERVED_29_MASK1 << 29
RELEASE_MASK1 << 30
MODIFIER_MASK0x5c001fff

Meta