Signal

GtkEventControllerKey::key-pressed

since: 3.24

Declaration

gboolean
key_pressed (
  GtkEventControllerKey* self,
  guint keyval,
  guint keycode,
  GdkModifierType* state,
  gpointer user_data
)

Description [src]

This signal is emitted whenever a key is pressed.

Default handler:

The default handler is called after the handlers added via g_signal_connect().

Available since: 3.24

Parameters

keyval

Type: guint

The pressed key.

keycode

Type: guint

The raw code of the pressed key.

state

Type: GdkModifierType

The bitmask, representing the state of modifier keys and pointer buttons. See GdkModifierType.

The data is owned by the caller of the function.

Return value

Type: gboolean

TRUE if the key press was handled, FALSE otherwise.