2 .\" Title: xquerydevicestate
3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
6 .\" Manual: [FIXME: manual]
7 .\" Source: [FIXME: source]
10 .TH "XQUERYDEVICESTATE" "libmansuffix" "09/23/2011" "[FIXME: source]" "[FIXME: manual]"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
25 .\" disable justification (adjust text to left margin only)
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
31 XQueryDeviceState \- query the state of an extension input device\&.
35 #include <X11/extensions/XInput\&.h>
39 XDeviceState* XQueryDeviceState( Display *display,
45 Specifies the connection to the X server\&.
50 Specifies the device whose state is to be queried\&.
58 The XQueryDeviceState request queries the state of an input
59 device\&. The current state of keys and buttons (up or down), and
60 valuators (current value) on the device is reported by this
61 request\&. Each key or button is represented by a bit in the
62 XDeviceState structure that is returned\&. Valuators on the
63 device report 0 if they are reporting relative information, and
64 the current value if they are reporting absolute information\&.
74 XQueryDeviceState can generate a BadDevice error\&.
94 The XDeviceState structure contains:
118 The XValuatorState structure contains:
130 unsigned char length;
131 unsigned char num_valuators;
144 The XKeyState structure contains:
156 unsigned char length;
169 The XButtonState structure contains:
181 unsigned char length;
196 An invalid device was specified\&. The specified device
197 does not exist or has not been opened by this client via
198 XOpenInputDevice\&. This error may also occur if some
199 other client has caused the specified device to become
200 the X keyboard or X pointer device via the
201 XChangeKeyboardDevice or XChangePointerDevice requests\&.