Declaration
(define-gboxed-variant-cstruct event "GdkEvent"
(type event-type)
(window (g:object window))
(send-event (:boolean :int8))
(:variant type
...
((:key-press :key-release) event-key
(time :uint32)
(state modifier-type)
(keyval :uint)
(length :int)
(string (:string :free-from-foreign nil
:free-to-foreign nil))
(hardware-keycode :uint16)
(group :uint8)
(is-modifier :uint))
... )) Values - type
- The gdk:event-type type of the event, one of the :key-press, :key-release values.
- window
- The gdk:window object which received the event.
- send-event
- True if the event was sent explicitly.
- time
- The unsigned integer with the time of the event in milliseconds.
- state
- The gdk:modifier-type bit-mask representing the state of the modifier keys, for example, the Control, Shift and Alt keys, and the pointer buttons.
- keyval
- The key that was pressed or released. See the gdk/gdkkeysyms.h header file for a complete list of GDK key codes.
- length
- The integer with the length of the string field.
- string
- The string containing an approximation of the text that
would result from this keypress. The only correct way to handle text input is using input methods, see the gtk:im-context API, so
this field is deprecated and should never be used. The gdk:unicode-to-keyval function provides a non-deprecated way of getting an approximate translation for a key. The string field 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 an empty translation.
- hardware-keycode
- The unsigned integer with the raw code of the key that was pressed or released.
- group
- The unsigned integer with the keyboard group.
- is-modifier
- The flag that indicates if the hardware-keycode field is mapped to a modifier.
Details Describes a key press or key release event. Possible event types are the :key-press or :key-release values. |
| Slot Access FunctionsInherited Slot Access FunctionsSee also |