Enumeration (GI Flags)

Gdk-3.0GdkModifierType

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.ModifierType.SUPER_MASK, Gdk.ModifierType.HYPER_MASK or Gdk.ModifierType.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.ModifierType.MODIFIER_RESERVED_13_MASK. Your code should preserve and ignore them. You can use Gdk.ModifierType.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.ModifierType.BUTTON4_MASK and Gdk.ModifierType.BUTTON5_MASK will never be set.

Index
BUTTON1_MASK: 256

the first mouse button.

BUTTON2_MASK: 512

the second mouse button.

BUTTON3_MASK: 1024

the third mouse button.

BUTTON4_MASK: 2048

the fourth mouse button.

BUTTON5_MASK: 4096

the fifth mouse button.

CONTROL_MASK: 4

the Control key.

HYPER_MASK: 134217728

the Hyper modifier. Since 2.10

LOCK_MASK: 2

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

META_MASK: 268435456

the Meta modifier. Since 2.10

MOD1_MASK: 8

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).

MOD2_MASK: 16

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

MOD3_MASK: 32

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

MOD4_MASK: 64

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

MOD5_MASK: 128

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

MODIFIER_MASK: 1543512063

a mask covering all modifier types.

MODIFIER_RESERVED_13_MASK: 8192

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

MODIFIER_RESERVED_14_MASK: 16384

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

MODIFIER_RESERVED_15_MASK: 32768

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

MODIFIER_RESERVED_16_MASK: 65536

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

MODIFIER_RESERVED_17_MASK: 131072

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

MODIFIER_RESERVED_18_MASK: 262144

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

MODIFIER_RESERVED_19_MASK: 524288

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

MODIFIER_RESERVED_20_MASK: 1048576

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

MODIFIER_RESERVED_21_MASK: 2097152

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

MODIFIER_RESERVED_22_MASK: 4194304

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

MODIFIER_RESERVED_23_MASK: 8388608

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

MODIFIER_RESERVED_24_MASK: 16777216

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

MODIFIER_RESERVED_25_MASK: 33554432

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

MODIFIER_RESERVED_29_MASK: 536870912

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

RELEASE_MASK: 1073741824

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

SHIFT_MASK: 1

the Shift key.

SUPER_MASK: 67108864

the Super modifier. Since 2.10

Variables

$gtype