# Accessibility::EventListenerMode Struct Reference

`import "Accessibility_Registry.idl";`

## Data Fields

boolean | synchronous
boolean | preemptive
boolean | global

## Detailed Description

A structure that encapsulates the characteristics of the event notifications that should be sent to an EventListener in response to a call to DeviceEventController::registerKeystrokeListener or DeviceEventController::registerDeviceEventListener.

## Field Documentation

boolean Accessibility::EventListenerMode::synchronous

If `True`, specifies that DeviceEventController should block while waiting for client to process the requested event notifications; ordinarily should be used only when client needs to perform operations synchronously with event delivery. Note that because of the architecture of device event systems in general, use of this flag may not block delivery of the event to the currently focussed application unless it is used in conjunction with the preemptive flag.

boolean Accessibility::EventListenerMode::preemptive

If `True`, specifies that Listener is allowed to pre-empt the delivery of the event, effectively "consuming" it such that it is not delivered to the currently focussed desktop application. Key events consumed via this API will not be available for use by other applications or services, so this option should be used sparingly.

boolean Accessibility::EventListenerMode::global

If `True`, specifies that Event notifications should be sent regardless of whether the currently focussed application participates in the AT-SPI infrastructure. On systems with the XEvIE X extension, this flag also allows access to events which are already subject to interception via a "system keygrab" (as described in the X Window System documentation for XGrabKey). The 'global' and 'preemptive' flags should only be used together for the purposes of registering "system global key shortcuts" i.e. command keys for use by the assistive technology.

The documentation for this struct was generated from the following file:

- /home/liyuan/src/at-spi/idl/Accessibility_Registry.idl