Gtk.EventControllerKey¶
class — extends EventController
Provides access to key events.
Constructors¶
new¶
Creates a new event controller that will handle key events.
Methods¶
forward¶
Forwards the current event of this controller to a widget.
This function can only be used in handlers for the
EventControllerKey.key-pressed,
EventControllerKey.key-released
or EventControllerKey.modifiers signals.
Parameters:
widget— aGtkWidget
get_group¶
Gets the key group of the current event of this controller.
get_im_context¶
Gets the input method context of the key controller.
set_im_context¶
Sets the input method context of the key controller.
Parameters:
im_context— aGtkIMContext
Signals¶
im-update¶
Emitted whenever the input method context filters away
a keypress and prevents the controller receiving it.
See EventControllerKey.set_im_context and
IMContext.filter_keypress.
key-pressed¶
Emitted whenever a key is pressed.
key-released¶
Emitted whenever a key is released.
modifiers¶
Emitted whenever the state of modifier keys and pointer buttons change.