The accessibility registry can also be used to listen for and create events.

The registerGlobalEventListener() method can be used to register an event listener object to receive events of a particular type. When such an event occurs, the listener's notifyEvent() method will be invoked.

To generate keyboard and mouse events, we call the registry's getDeviceEventController() method to get an Accessible::DeviceEventController object.

The generateKeyboardEvent() and generateMouseEvent() methods on this object are used to synthesise the events.