Handhelds.org - Open source for handheld devices

UserPreferences

XTestFakeKeyEvent


XTestFakeKeyEvent

XTestFakeKeyEvent is a function in the XTest extension. This function is preferred over XSendEvent, (see reasoning under GeneratingSyntheticX11Events).

Documentation for XTestFakeKeyEvent:

XTestFakeKeyEvent(display, keycode, is_press, delay)
  Display *display;
  unsigned int keycode;
  Bool is_press;
  unsigned long delay;

If the extension is supported, XTestFakeKeyEvent requests the server to simulate either a KeyPress (if is_press is True) or a KeyRelease (if is_press is False) of the key with the specified keycode; otherwise, the request is ignored.

If the extension is supported, the simulated event will not be processed until delay milliseconds after the request is received (if delay is CurrentTime, then this is interpreted as no delay at all). No other requests from this client will be processed until this delay, if any, has expired and subsequent processing of this simulated event has been completed.