register_keystroke_listener


Description:


public bool register_keystroke_listener (DeviceListener listener, Array<KeyDefinition>? key_set, KeyMaskType modmask, KeyEventMask event_types, KeyListenerSyncType sync_type) throws Error

Registers a listener for keystroke events, either pre-emptively for all windows (atspi_keylistener_all_windows ), non-preemptively (atspi_keylistener_nosync), or pre-emptively at the toolkit level ( atspi_keylistener_canconsume).

If ALL_WINDOWS or CANCONSUME are used, the event is consumed upon receipt if one of listener's callbacks returns true (other sync_type values may be available in the future).

Parameters:

listener

a pointer to the DeviceListener for which keystroke events are requested.

key_set

a pointer to the KeyDefinition array indicating which keystroke events are requested, or NULL to indicate that all keycodes and keyvals for the specified modifier set are to be included.

modmask

an KeyMaskType mask indicating which key event modifiers must be set in combination with keys, events will only be reported for key events for which all modifiers in modmask are set. If you wish to listen for events with multiple modifier combinations, you must call register_keystroke_listener once for each combination.

event_types

an KeyMaskType mask indicating which types of key events are requested ( atspi_key_pressed etc.).

sync_type

an KeyListenerSyncType parameter indicating the behavior of the notification/listener transaction.

Returns:

true if successful, otherwise false.


Namespace: Atspi
Package: atspi-2