Gjsify LogoGjsify Logo

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.

bitfield

Index

Enumeration Members

BUTTON1_MASK: number

the first mouse button.

BUTTON2_MASK: number

the second mouse button.

BUTTON3_MASK: number

the third mouse button.

BUTTON4_MASK: number

the fourth mouse button.

BUTTON5_MASK: number

the fifth mouse button.

CONTROL_MASK: number

the Control key.

HYPER_MASK: number

the Hyper modifier. Since 2.10

LOCK_MASK: number

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

META_MASK: number

the Meta modifier. Since 2.10

MOD1_MASK: number

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: number

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

MOD3_MASK: number

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

MOD4_MASK: number

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

MOD5_MASK: number

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

MODIFIER_MASK: number

a mask covering all modifier types.

MODIFIER_RESERVED_13_MASK: number

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

MODIFIER_RESERVED_14_MASK: number

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

MODIFIER_RESERVED_15_MASK: number

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

MODIFIER_RESERVED_16_MASK: number

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

MODIFIER_RESERVED_17_MASK: number

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

MODIFIER_RESERVED_18_MASK: number

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

MODIFIER_RESERVED_19_MASK: number

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

MODIFIER_RESERVED_20_MASK: number

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

MODIFIER_RESERVED_21_MASK: number

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

MODIFIER_RESERVED_22_MASK: number

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

MODIFIER_RESERVED_23_MASK: number

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

MODIFIER_RESERVED_24_MASK: number

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

MODIFIER_RESERVED_25_MASK: number

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

MODIFIER_RESERVED_29_MASK: number

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

RELEASE_MASK: number

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

SHIFT_MASK: number

the Shift key.

SUPER_MASK: number

the Super modifier. Since 2.10

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method