Atspi.Device.add_key_grab

### Method

# Atspi Deviceadd_key_grab

#### Declaration [src]

    guint
    atspi_device_add_key_grab (
      AtspiDevice* device,
      AtspiKeyDefinition* kd,
      AtspiKeyCallback callback,
      void* user_data,
      GDestroyNotify callback_destroyed
    )

#### Description

No description available.

#### Parameters

`kd`

  Type: `AtspiKeyDefinition`

  A `AtspiKeyDefinition` specifying the key code to grab.

  The data is owned by the caller of the method.

`callback`

  Type: `AtspiKeyCallback`

  The function to call when the given key is pressed.

  The argument can be `NULL`.

`user_data`

  Type: `void*`

  Data to be passed to `callback`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`callback_destroyed`

  Type: `GDestroyNotify`

  Callback function to be called when `callback` is destroyed.

#### Return value

Type: `guint`

An identifier that can be later used to remove the grab, or 0 if the key/modifier combination could not be grabbed. Add a key grab for the given key/modifier combination.