It derives from <GtkEventController>.
Provides access to key events.
Forwards the current event of this self to a widget.
This function can only be used in handlers for the
event-controller-key:key-pressed,
event-controller-key:key-released or
event-controller-key:modifiers signals.
Passed: a <GtkEventControllerKey>.
Passed: a <GtkWidget>.
Returned: a boolean.
whether the widget handled the event
Gets the key group of the current event of this self.
See key-event:get-layout.
Passed: a <GtkEventControllerKey>.
Returned: an unsigned 32-bit integer.
the key group
Gets the input method context of the key self.
Passed: a <GtkEventControllerKey>.
Returned: a <GtkIMContext>, or #f.
the <GtkIMContext>
Creates a new event controller that will handle key events.
Returned: a <GtkEventController>.
a new <GtkEventControllerKey>
Sets the input method context of the key self.
Passed: a <GtkEventControllerKey>.
Passed, or left out: a <GtkIMContext>, or
#f.
Connect a handler with (connect object
event-controller-key:im-update handler). It is called as
(handler self).
Emitted whenever the input method context filters away a keypress and prevents the controller receiving it.
See event-controller-key:set-im-context and
imcontext:filter-keypress?.
Passed: a <GtkEventControllerKey>.
Connect a handler with (connect object
event-controller-key:key-pressed handler). It is called as
(handler self keyval keycode state) ⇒ %return.
Emitted whenever a key is pressed.
Passed: a <GtkEventControllerKey>.
Passed: an unsigned 32-bit integer.
the pressed key.
Passed: an unsigned 32-bit integer.
the raw code of the pressed key.
Passed: a <GdkModifierType>.
the bitmask, representing the state of modifier keys and pointer buttons.
Returned: a boolean.
#t if the key press was handled, #f otherwise.
Connect a handler with (connect object
event-controller-key:key-released handler). It is called as
(handler self keyval keycode state).
Emitted whenever a key is released.
Passed: a <GtkEventControllerKey>.
Passed: an unsigned 32-bit integer.
the released key.
Passed: an unsigned 32-bit integer.
the raw code of the released key.
Passed: a <GdkModifierType>.
the bitmask, representing the state of modifier keys and pointer buttons.
Connect a handler with (connect object
event-controller-key:modifiers handler). It is called as
(handler self state) ⇒ %return.
Emitted whenever the state of modifier keys and pointer buttons change.
Passed: a <GtkEventControllerKey>.
Passed: a <GdkModifierType>.
the bitmask, representing the new state of modifier keys and pointer buttons.
Returned: a boolean.
whether to ignore modifiers