EventControllerKey#
Superclasses: EventController
, Object
GtkEventControllerKey
is an event controller that provides access
to key events.
Constructors#
- class EventControllerKey
- classmethod new() EventController #
Creates a new event controller that will handle key events.
Methods#
- class EventControllerKey
- forward(widget: Widget) bool #
Forwards the current event of this
controller
to awidget
.This function can only be used in handlers for the
key_pressed
,key_released
ormodifiers
signals.- Parameters:
widget – a
GtkWidget
- get_group() int #
Gets the key group of the current event of this
controller
.See
get_layout
.
Signals#
- class EventControllerKey.signals
-
- key_pressed(keyval: int, keycode: int, state: ModifierType) bool #
The type of the None singleton.
- Parameters:
keyval – the pressed key.
keycode – the raw code of the pressed key.
state – the bitmask, representing the state of modifier keys and pointer buttons.
- key_released(keyval: int, keycode: int, state: ModifierType) None #
The type of the None singleton.
- Parameters:
keyval – the released key.
keycode – the raw code of the released key.
state – the bitmask, representing the state of modifier keys and pointer buttons.
- modifiers(state: ModifierType) bool #
The type of the None singleton.
- Parameters:
state – the bitmask, representing the new state of modifier keys and pointer buttons.