Gtk.Widget::key-press-event

function callback(widget, event:Gdk.EventKey, ):Boolean;

The ::key-press-event signal is emitted when a key is pressed. The signal emission will reoccur at the key-repeat rate when the key is kept pressed.

To receive this signal, the Gdk.Window associated to the widget needs to enable the #GDK_KEY_PRESS_MASK mask.

This signal will be sent to the grab widget if there is one.

widget

instance of Gtk.Widget that is emitting the signal

event

the Gdk.EventKey which triggered this signal.

Returns

true to stop other handlers from being invoked for the event. false to propagate the event further.