Struct
GdkEventKey
Description [src]
struct GdkEventKey {
GdkEventType type;
GdkWindow* window;
gint8 send_event;
guint32 time;
GdkModifierType* state;
guint keyval;
gint length;
gchar* string;
guint16 hardware_keycode;
guint8 group;
guint is_modifier : 1;
}
Describes a key press or key release event.
Structure members
type:GdkEventTypeThe type of the event (
GDK_KEY_PRESSorGDK_KEY_RELEASE).window:GdkWindowThe window which received the event.
send_event:gint8TRUEif the event was sent explicitly.time:guint32The time of the event in milliseconds.
state:GdkModifierTypeA bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See
GdkModifierType.keyval:guintThe key that was pressed or released. See the
gdk/gdkkeysyms.hheader file for a complete list of GDK key codes.length:gintThe length of
string.string:gchar*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 atlengthis necessary to distinguish it from the an empty translation.hardware_keycode:guint16The raw code of the key that was pressed or released.
group:guint8The keyboard group.
is_modifier:guintA flag that indicates if
hardware_keycodeis mapped to a modifier. Since 2.10.