Add a callback that will receive a notification whenever a key is pressed or released.
Connect to the key-pressed and key-released signals instead of using this function.
| this |
the device. |
| callback |
the function to call when the given key is pressed. |
| callback_destroyed |
callback function to be called when |
| user_data |
Data to be passed to |