### 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` | `guint`
| The pressed key.
`keycode` | `guint`
| The raw code of the pressed key.
`state` | `GdkModifierType`
| The bitmask, representing the state of modifier keys and pointer buttons. See `GdkModifierType`.

#### Return value

Returns: | `gboolean`
| `TRUE` if the key press was handled, `FALSE` otherwise.