### Signal

# Gtk EventControllerKey::key-pressed

#### Declaration

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

#### Description [src]

Emitted whenever a key is pressed.

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

#### 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.

#### Return value

Type: `gboolean`

`TRUE` if the key press was handled, `FALSE` otherwise.