add_key_watcher


Description:

public void add_key_watcher (owned KeyCallback? callback)

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

Parameters:

this

the device.

callback

the function to call when the given key is pressed.

callback_destroyed

callback function to be called when callback is destroyed.

user_data

Data to be passed to callback.