### Method

# Atspi Device add_key_watcher

deprecated: 2.60

#### Declaration [src]

    void
    atspi_device_add_key_watcher (
      AtspiDevice* device,
      AtspiKeyCallback callback,
      void* user_data,
      GDestroyNotify callback_destroyed
    )

#### Description [src]

Add a callback that will receive a notification whenever a key is pressed or released.

Deprecated since: 2.60

Connect to the key-pressed and key-released signals instead of using this function.

#### Parameters

`callback`

  Type: `AtspiKeyCallback`

  The function to call when the given key is pressed.

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