Gjsify LogoGjsify Logo

Describes a key press or key release event.

record

Hierarchy

  • EventKey

Index

Constructors

Properties

group: number

the keyboard group.

field
hardware_keycode: number

the raw code of the key that was pressed or released.

field
is_modifier: number

a flag that indicates if hardware_keycode is mapped to a modifier. Since 2.10

field
keyval: number

the key that was pressed or released. See the gdk/gdkkeysyms.h header file for a complete list of GDK key codes.

field
length: number

the length of string.

field
send_event: number

%TRUE if the event was sent explicitly.

field

a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See #GdkModifierType.

field
string: string

a string containing an approximation of the text that would result from this keypress. The only correct way to handle text input of text is using input methods (see #GtkIMContext), so this field is deprecated and should never be used. (gdk_unicode_to_keyval() provides a non-deprecated way of getting an approximate translation for a key.) The string is encoded in the encoding of the current locale (Note: this for backwards compatibility: strings in GTK+ and GDK are typically in UTF-8.) and NUL-terminated. In some cases, the translation of the key code will be a single NUL byte, in which case looking at length is necessary to distinguish it from the an empty translation.

field
time: number

the time of the event in milliseconds.

field

the type of the event (%GDK_KEY_PRESS or %GDK_KEY_RELEASE).

field
window: Gdk.Window

the window which received the event.

field
name: string

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