Clutter.KeyController.get_state

### Method

# Clutter KeyControllerget_state

#### Declaration [src]

    gboolean
    clutter_key_controller_get_state (
      ClutterKeyController* key_controller,
      ClutterModifierType* pressed,
      ClutterModifierType* latched,
      ClutterModifierType* locked
    )

#### Description [src]

Should be called within a `ClutterKeyController::key-press`, `ClutterKeyController::key-release` or `ClutterKeyController::modifier-change` signals to retrieve a meaningful state. `FALSE` will be returned otherwise.

Retrieves the current keyboard state modifiers, `pressed` contains the actively pressed keys, `latched` the modifiers that have a temporal effect (e.g. on “slow keys” accessibility feature), and `locked` the modifiers that are currently locked in place (e.g. caps-lock key).

The retrieved modifiers are those previously in effect before the signal received. E.g. a shift key press will emit a `ClutterKeyController::key-press` event where `CLUTTER_SHIFT_MASK` is not yet enabled.

#### Parameters

`pressed`

  Type: `ClutterModifierType`

  Return location for the pressed modifiers.

  The argument will be set by the function.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.

`latched`

  Type: `ClutterModifierType`

  Return location for the latched modifiers.

  The argument will be set by the function.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.

`locked`

  Type: `ClutterModifierType`

  Return location for the locked modifiers.

  The argument will be set by the function.
  The caller of the method takes ownership of the returned data, and is responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE` if keyboard modifiers could be retrieved.