Package: gdk

GBoxed gdk-event-key

Superclasses

gdk-event, common-lisp:structure-object, common-lisp:t

Documented Subclasses

None

Details

Describes a key press or key release event. Possible event types are the :key-press or :key-release values.
(define-g-boxed-variant-cstruct gdk-event "GdkEvent"
  (type gdk-event-type)
  (window (g-object gdk-window))
  (send-event (:boolean :int8))
  (:variant type
            ...
            ((:key-press :key-release) gdk-event-key
             (time :uint32)
             (state gdk-modifier-type)
             (keyval :uint)
             (length :int)
             (string (:string :free-from-foreign nil
                              :free-to-foreign nil))
             (hardware-keycode :uint16)
             (group :uint8)
             (is-modifier :uint))
  ... ))  
type
The gdk-event-type type of the event, one of the values :key-press, :key-release.
window
The gdk-window object which received the event.
send-event
True if the event was sent explicitly.
time
An unsigned integer with the time of the event in milliseconds.
state
The gdk-modifier-type bit-mask representing the state of the modifier keys, e.g. 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
An integer with the length of the string field.
string
A 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
An unsigned integer with the raw code of the key that was pressed or released.
group
An unsigned integer with the keyboard group.
is-modifier
A flag that indicates if the hardware-keycode field is mapped to a modifier.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2021-12-13