1 XQUERYDEVICESTATE(libmansuffix)
2 ===============================
7 XQueryDeviceState - query the state of an extension input
13 #include <X11/extensions/XInput.h>
15 XDeviceState* XQueryDeviceState( Display *display,
19 Specifies the connection to the X server.
22 Specifies the device whose state is to be queried.
27 The XQueryDeviceState request queries the state of an input
28 device. The current state of keys and buttons (up or down), and
29 valuators (current value) on the device is reported by this
30 request. Each key or button is represented by a bit in the
31 XDeviceState structure that is returned. Valuators on the
32 device report 0 if they are reporting relative information, and
33 the current value if they are reporting absolute information.
35 XQueryDeviceState can generate a BadDevice error.
39 The XDeviceState structure contains:
47 The XValuatorState structure contains:
52 unsigned char num_valuators;
57 The XKeyState structure contains:
66 The XButtonState structure contains:
79 An invalid device was specified. The specified device
80 does not exist or has not been opened by this client via
81 XOpenInputDevice. This error may also occur if some
82 other client has caused the specified device to become
83 the X keyboard or X pointer device via the
84 XChangeKeyboardDevice or XChangePointerDevice requests.