Enumeration

GdkModifierType

Declaration

flags Gdk.ModifierType

Description [src]

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.

Also note that the GDK X backend interprets button press events for button 4-7 as scroll events, so GDK_BUTTON4_MASK and GDK_BUTTON5_MASK will never be set.

Members

GDK_SHIFT_MASK

The Shift key.

  • Value: 1
  • Available since: 3.0
GDK_LOCK_MASK

A Lock key (depending on the modifier mapping of the X server this may either be CapsLock or ShiftLock).

  • Value: 2
  • Available since: 3.0
GDK_CONTROL_MASK

The Control key.

  • Value: 4
  • Available since: 3.0
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).

  • Value: 8
  • Available since: 3.0
GDK_MOD2_MASK

The fifth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).

  • Value: 16
  • Available since: 3.0
GDK_MOD3_MASK

The sixth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).

  • Value: 32
  • Available since: 3.0
GDK_MOD4_MASK

The seventh modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).

  • Value: 64
  • Available since: 3.0
GDK_MOD5_MASK

The eighth modifier key (it depends on the modifier mapping of the X server which key is interpreted as this modifier).

  • Value: 128
  • Available since: 3.0
GDK_BUTTON1_MASK

The first mouse button.

  • Value: 256
  • Available since: 3.0
GDK_BUTTON2_MASK

The second mouse button.

  • Value: 512
  • Available since: 3.0
GDK_BUTTON3_MASK

The third mouse button.

  • Value: 1024
  • Available since: 3.0
GDK_BUTTON4_MASK

The fourth mouse button.

  • Value: 2048
  • Available since: 3.0
GDK_BUTTON5_MASK

The fifth mouse button.

  • Value: 4096
  • Available since: 3.0
GDK_MODIFIER_RESERVED_13_MASK

A reserved bit flag; do not use in your own code.

  • Value: 8192
  • Available since: 3.0
GDK_MODIFIER_RESERVED_14_MASK

A reserved bit flag; do not use in your own code.

  • Value: 16384
  • Available since: 3.0
GDK_MODIFIER_RESERVED_15_MASK

A reserved bit flag; do not use in your own code.

  • Value: 32768
  • Available since: 3.0
GDK_MODIFIER_RESERVED_16_MASK

A reserved bit flag; do not use in your own code.

  • Value: 65536
  • Available since: 3.0
GDK_MODIFIER_RESERVED_17_MASK

A reserved bit flag; do not use in your own code.

  • Value: 131072
  • Available since: 3.0
GDK_MODIFIER_RESERVED_18_MASK

A reserved bit flag; do not use in your own code.

  • Value: 262144
  • Available since: 3.0
GDK_MODIFIER_RESERVED_19_MASK

A reserved bit flag; do not use in your own code.

  • Value: 524288
  • Available since: 3.0
GDK_MODIFIER_RESERVED_20_MASK

A reserved bit flag; do not use in your own code.

  • Value: 1048576
  • Available since: 3.0
GDK_MODIFIER_RESERVED_21_MASK

A reserved bit flag; do not use in your own code.

  • Value: 2097152
  • Available since: 3.0
GDK_MODIFIER_RESERVED_22_MASK

A reserved bit flag; do not use in your own code.

  • Value: 4194304
  • Available since: 3.0
GDK_MODIFIER_RESERVED_23_MASK

A reserved bit flag; do not use in your own code.

  • Value: 8388608
  • Available since: 3.0
GDK_MODIFIER_RESERVED_24_MASK

A reserved bit flag; do not use in your own code.

  • Value: 16777216
  • Available since: 3.0
GDK_MODIFIER_RESERVED_25_MASK

A reserved bit flag; do not use in your own code.

  • Value: 33554432
  • Available since: 3.0
GDK_SUPER_MASK

The Super modifier. Since 2.10.

  • Value: 67108864
  • Available since: 3.0
GDK_HYPER_MASK

The Hyper modifier. Since 2.10.

  • Value: 134217728
  • Available since: 3.0
GDK_META_MASK

The Meta modifier. Since 2.10.

  • Value: 268435456
  • Available since: 3.0
GDK_MODIFIER_RESERVED_29_MASK

A reserved bit flag; do not use in your own code.

  • Value: 536870912
  • Available since: 3.0
GDK_RELEASE_MASK

Not used in GDK itself. GTK+ uses it to differentiate between (keyval, modifiers) pairs from key press and release events.

  • Value: 1073741824
  • Available since: 3.0
GDK_MODIFIER_MASK

A mask covering all modifier types.

  • Value: 1543512063
  • Available since: 3.0