R6.6 is the Xorg base-line

parents
.\"
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
.\"
.\" Permission to use, copy, modify, distribute, and sell this documentation
.\" for any purpose and without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\" Ardent, and Hewlett-Packard make no representations about the
.\" suitability for any purpose of the information in this document. It is
.\" provided \`\`as is'' without express or implied warranty.
.\"
.\" $Xorg: XAllDvEv.man,v 1.4 2001/03/16 17:51:13 pookie Exp $
.ds xL Programming With Xlib
.TH XAllowDeviceEvents 3X11 "Release 6.6" "X Version 11" "X FUNCTIONS"
.SH NAME
XAllowDeviceEvents \- release queued events
.SH SYNTAX
XAllowDeviceEvents\^(\^\fIdisplay\fP, \fIdevice\fP\^, \fIevent_mode\fP\^, \fItime\fP\^)
.br
Display *\fIdisplay\fP\^;
.br
XDevice *\fIdevice\fP\^;
.br
int \fIevent_mode\fP\^;
.br
Time \fItime\fP\^;
.SH ARGUMENTS
.TP 12
.I display
Specifies the connection to the X server.
.TP 12
.I device
Specifies the device from which events are to be allowed.
.TP 12
.I event_mode
Specifies the event mode.
You can pass
\fIAsyncThisDevice\fP,
\fISyncThisDevice\fP,
\fIReplayThisDevice\fP,
\fIAsyncOtherDevices\fP,
\fISyncAll\fP,
or
\fIAsyncAll\fP.
.TP 12
.I time
Specifies the time.
You can pass either a timestamp or
\fICurrentTime\fP.
.SH DESCRIPTION
The
\fIXAllowDeviceEvents\fP
function releases some queued events if the client has caused a device
to freeze.
It has no effect if the specified time is earlier than the last-grab
time of the most recent active grab for the client and device,
or if the specified time is later than the current X server time.
.LP
The following describes the processing that occurs depending on what
constant you pass to the event_mode argument.
.TP 12
\fIAsyncThisDevice\fP
If the specified device is frozen by the client, event processing for that
device continues as usual. If the device is frozen multiple times by the client
on behalf of multiple separate grabs, \fIAsyncThisDevice\fP thaws for all.
\fIAsyncThisDevice\fP has no effect if the specified device is not frozen by
the client, but the device need not be grabbed by the client.
.TP 12
\fISyncThisDevice\fP
If the specified device is frozen and actively grabbed by the client, event
processing for that device continues normally until the next key or button
event is reported to the client. At this time, the specified device
again appears to freeze. However, if the reported event causes the grab
to be released, the specified device does not freeze. \fISyncThisDevice\fP
has no effect if the specified device is not frozen by the client or is not
grabbed by the client.
.TP 12
\fIReplayThisDevice\fP
If the specified device is actively grabbed by the client and is frozen as
the result of an event having been sent to the client (either from the
activation of a GrabDeviceButton or from a previous AllowDeviceEvents with
mode SyncThisDevice, but not from a GrabDevice), the grab is released and that
event is completely reprocessed. This time, however, the request ignores
any passive grabs at or above (toward the root) that the grab-window of the
grab just released. The request has no effect if the specified device is
not grabbed by the client or if it is not frozen as the result of an event.
.TP 12
\fIAsyncOtherDevices\fP
If the remaining devices are frozen by the client, event processing for them
continues as usual. If the other devices are frozen multiple times by the
client on behalf of multiple grabs, \fIAsyncOtherDevices\fP "thaws" for
all. \fIAsyncOtherDevices\fP has no effect if the devices are not frozen
by the client.
.TP 12
\fISyncAll\fP
If all devices are frozen by the client, event processing (for all devices)
continues normally until the next button or key event is reported to the
client for a grabbed device, at which time all devices again appear to freeze.
However, if the reported event causes the grab to be released, then the devices
do not freeze. If any device is still grabbed, then a subsequent event for it
will still cause all devices to freeze. \fISyncAll\fP has no
effect unless all devices are frozen by the client. If any device is
frozen twice by the client on behalf of two separate grabs, \fISyncAll\fP thaws
for both. A subsequent freeze for \fISyncAll\fP will only
freeze each device once.
.TP 12
\fIAsyncAll\fP
If all devices are frozen by the client, event processing for all devices
continues normally. If any device is frozen multiple times by the client
on behalf of multiple separate grabs, \fIAsyncAll\fP thaws for
all. \fIAsyncAll\fP has no effect unless all devices are frozen by
the client.
.LP
\fIAsyncThisDevice\fP,
\fISyncThisDevice\fP,
and
\fIReplayThisDevice\fP
have no effect on the processing of events from the remaining devices.
\fIAsyncOtherDevices\fP
has no effect on the processing of events from the specified device. When
the event_mode is
\fISyncAll\fP
or
\fIAsyncAll\fP,
the device parameter is ignored.
.LP
It is possible for several grabs of different devices by the same or
different clients to be active simultaneously. If a device is frozen on
behalf of any grab, no event processing is performed for the device.
It is possible for a single device to be frozen because of several grabs.
In this case, the freeze must be released on behalf of each grab before
events can again be processed.
.LP
\fIXAllowDeviceEvents\fP
can generate a \fIBadDevice\fP or
\fIBadValue\fP
error.
.SH DIAGNOSTICS
.TP 12
\fIBadDevice\fP
An invalid device was specified. The specified device does not exist or has
not been opened by this client via \fIXOpenInputDevice\fP. This error may
also occur if the specified device is the X keyboard or X pointer device.
.TP 12
\fIBadValue\fP
An invalid mode was specified on the request.
.SH "SEE ALSO"
XGrabDevice(3X11)
.br
\fI\*(xL\fP
.\"
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
.\"
.\" Permission to use, copy, modify, distribute, and sell this documentation
.\" for any purpose and without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\" Ardent, and Hewlett-Packard make no representations about the
.\" suitability for any purpose of the information in this document. It is
.\" provided \`\`as is'' without express or implied warranty.
.\"
.\" $Xorg: XChProp.man,v 1.4 2001/03/16 17:51:13 pookie Exp $
.ds xL Programming With Xlib
.TH XChangeDeviceDontPropagateList 3X11 "Release 6.6" "X Version 11" "X FUNCTIONS"
.SH NAME
XChangeDeviceDontPropagateList, XGetDeviceDontPropagateList \- query or change the dont-propagate-list for extension devices
.SH SYNTAX
XChangeDeviceDontPropagateList\^(\^\fIdisplay\fP, \fIwindow\fP\^,
\fIcount\fP\^, \fIevent_list\fP\^, \fImode\fP\^)
.br
Display *\fIdisplay\fP\^;
.br
Window *\fIwindow\fP\^;
.br
int *\fIcount\fP\^;
.br
XEventClass *\fIevent_list\fP\^;
.br
int \fImode\fP\^;
.br
XEventClass *XGetDeviceDontPropagateList\^(\^\fIdisplay\fP, \fIwindow\fP\^,
\fIcount\fP\^)
.br
Display *\fIdisplay\fP\^;
.br
Window *\fIwindow\fP\^;
.br
int *\fIcount\fP\^;
.SH ARGUMENTS
.TP 12
.I display
Specifies the connection to the X server.
.TP 12
.I window
Specifies the window whose dont-propagate-list is to be queried or modified.
.TP 12
.I event_list
Specifies a pointer to a list of event classes.
.TP 12
.I mode
Specifies the mode.
You can pass
\fIAddToList\fP ,
or
\fIDeleteFromList\fP.
.TP 12
.I count
Specifies the number of event classes in the list.
.SH DESCRIPTION
The \fIXChangeDeviceDontPropagateList\fP request modifies the list
of events that should not be propagated to ancestors of the event window.
This request allows extension events to be added to or deleted from
that list. By default, all events are propagated to ancestor windows.
Once modified, the list remains modified for the life of the window.
Events are not removed from the list because the client that added them
has terminated.
.LP
Suppression of event propagation is not allowed for all input extension
events. If a specified event class is one that cannot be suppressed,
a \fIBadClass\fP error will result. Events that can be suppressed
include \fIDeviceKeyPress\fP, \fIDeviceKeyRelease\fP, \fIDeviceButtonPress\fP,
\fIDeviceButtonRelease\fP, \fIDeviceMotionNotify\fP, \fIProximityIn\fP,
and \fIProximityOut\fP.
.LP
\fIXChangeDeviceDontPropagateList\fP
can generate a \fIBadDevice\fP, \fIBadClass\fP, or \fIBadValue\fP error.
.LP
The \fIXGetDeviceDontPropagateList\fP request queries the list
of events that should not be propagated to ancestors of the event window.
.LP
\fIXGetDeviceDontPropagateList\fP
can generate a \fIBadClass\fP or \fIBadWindow\fP error.
.SH DIAGNOSTICS
.TP 12
\fIBadDevice\fP
An invalid device was specified. The specified device does not exist or has
not been opened by this client via \fIXOpenInputDevice\fP. This error may
also occur if some other client has caused the specified device to become
the X keyboard or X pointer device via the \fIXChangeKeyboardDevice\fP or
\fIXChangePointerDevice\fP requests.
.TP 12
\fIBadValue\fP
Some numeric value falls outside the range of values accepted by the request.
Unless a specific range is specified for an argument, the full range defined
by the argument's type is accepted. Any argument defined as a set of
alternatives can generate this error.
.TP 12
\fIBadWindow\fP
An invalid window id was specified.
.TP 12
\fIBadClass\fP
An invalid event class was specified.
.SH "SEE ALSO"
.br
\fI\*(xL\fP
.\"
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
.\"
.\" Permission to use, copy, modify, distribute, and sell this documentation
.\" for any purpose and without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\" Ardent, and Hewlett-Packard make no representations about the
.\" suitability for any purpose of the information in this document. It is
.\" provided \`\`as is'' without express or implied warranty.
.\"
.\" $Xorg: XChgKbd.man,v 1.4 2001/03/16 17:51:13 pookie Exp $
.ds xL Programming With Xlib
.TH XChangeKeyboardDevice 3X11 "Release 6.6" "X Version 11" "X FUNCTIONS"
.SH NAME
XChangeKeyboardDevice \- change which device is used as the X keyboard
.SH SYNTAX
Status XChangeKeyboardDevice\^(\^\fIdisplay\fP, \fIdevice\fP\^)
.br
Display *\fIdisplay\fP\^;
.br
XDevice *\fIdevice\fP\^;
.br
.SH ARGUMENTS
.TP 12
.I display
Specifies the connection to the X server.
.TP 12
.I device
Specifies the device to be used as the X keyboard.
.SH DESCRIPTION
The \fIXChangeKeyboardDevice\fP request causes the server to use the specified
device as the X keyboard. The device must have been previously opened by the
requesting client via \fIXOpenDevice\fP or a \fIBadDevice\fP error will result.
The device must support input class \fIKeys\fP, or a \fIBadMatch\fP error
will result. If the server implementation does not support using the requested
device as the X keyboard, a \fIBadDevice\fP error will result.
.LP
If the specified device is grabbed by another client, \fIAlreadyGrabbed\fP
is returned. If the specified device is frozen by a grab on another device,
\fIGrabFrozen\fP is returned.
If the request is successful, \fISuccess\fP is returned.
.LP
If the request succeeds,
a \fIChangeDeviceNotify\fP event is sent to all clients that have selected that
event. A \fIMappingNotify\fP event with request = \fIMappingKeyboard\fP
is sent to all clients.
The specified device becomes the X keyboard and
the old X keyboard becomes accessible through the input extension
protocol requests.
.LP
\fIXChangeKeyboardDevice\fP can generate a \fIBadDevice\fP or a \fIBadMatch\fP
error.
.SH DIAGNOSTICS
.TP 12
\fIBadDevice\fP
An invalid device was specified. The specified device does not exist, has
not been opened by this client via \fIXOpenInputDevice\fP, or is already
one of the core X device (pointer or keyboard). This error may
also occur if
the server implementation does not support using the specified device as
the X keyboard.
.TP 12
\fIBadMatch\fP
This error may occur if an \fIXChangeKeyboardDevice\fP request was made
specifying a device that has no keys.
.SH "SEE ALSO"
XChangePointerDevice
.br
\fI\*(xL\fP
.\"
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
.\"
.\" Permission to use, copy, modify, distribute, and sell this documentation
.\" for any purpose and without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\" Ardent, and Hewlett-Packard make no representations about the
.\" suitability for any purpose of the information in this document. It is
.\" provided \`\`as is'' without express or implied warranty.
.\"
.\" $Xorg: XChgPtr.man,v 1.4 2001/03/16 17:51:13 pookie Exp $
.ds xL Programming With Xlib
.TH XChangePointerDevice 3X11 "Release 6.6" "X Version 11" "X FUNCTIONS"
.SH NAME
XChangePointerDevice \- change which device is the X pointer
.SH SYNTAX
Status XChangePointerDevice\^(\^\fIdisplay\fP, \fIdevice\fP\^ \fIxaxis\fP\^, \fIyaxis\fP\^)
.br
Display *\fIdisplay\fP\^;
.br
XDevice *\fIdevice\fP\^;
.br
int \fIxaxis\fP\^;
.br
int \fIyaxis\fP\^;
.br
.SH ARGUMENTS
.TP 12
.I display
Specifies the connection to the X server.
.TP 12
.I device
Specifies the device to be used as the X pointer.
.TP 12
.I xaxis
Specifies the axis of the device to be used as the X pointer x-axis.
.TP 12
.I yaxis
Specifies the axis of the device to be used as the X pointer y-axis.
.SH DESCRIPTION
The \fIXChangePointerDevice\fP request causes the server to use the specified
device as the X pointer. The device must have been opened by the client via
\fIXOpenDevice\fP or a \fIBadDevice\fP error will result. The device must
support input class \fIValuators\fP or a \fIBadMatch\fP error will result.
If the implementation does not support use of the specified device as the
X pointer, a \fIBadDevice\fP error will result.
.LP
If the specified device is grabbed by another client, \fIAlreadyGrabbed\fP
is returned. If the specified device is frozen by a grab on another device,
\fIGrabFrozen\fP is returned.
If the request is successful, \fISuccess\fP is returned.
.LP
If the request succeeds,
a \fIChangeDeviceNotify\fP event is sent to all clients that have selected that
event. A \fIMappingNotify\fP event with request = \fIMappingPointer\fP is
sent to all clients.
The specified device becomes the X pointer, and
the old X pointer becomes accessible through the input extension
protocol requests.
.LP
\fIXChangePointerDevice\fP can generate a \fIBadDevice\fP or a \fIBadMatch\fP
error.
.SH DIAGNOSTICS
.TP 12
\fIBadDevice\fP
An invalid device was specified. The specified device does not exist, has
not been opened by this client via \fIXOpenInputDevice\fP, or is already
one of the core X input devices (pointer or keyboard). This error may also
occur if the server implementation does not support using the specified
device as the X pointer.
.TP 12
\fIBadMatch\fP
This error may occur if an \fIXChangePointerDevice\fP request was made
specifying a device that has less than two valuators, or specifying a
valuator index beyond the range supported by the device.
.SH "SEE ALSO"
XChangeKeyboardDevice
.br
\fI\*(xL\fP
.\"
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
.\"
.\" Permission to use, copy, modify, distribute, and sell this documentation
.\" for any purpose and without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\" Ardent, and Hewlett-Packard make no representations about the
.\" suitability for any purpose of the information in this document. It is
.\" provided \`\`as is'' without express or implied warranty.
.\"
.\" $Xorg: XDevBell.man,v 1.4 2001/03/16 17:51:13 pookie Exp $
.ds xL Programming With Xlib
.TH XDeviceBell 3X11 "Release 6.6" "X Version 11" "X FUNCTIONS"
.SH NAME
XDeviceBell \- ring a bell on a device supported through the input extension
.SH SYNTAX
Status XDeviceBell\^(\^\fIdisplay\fP, \fIdevice\fP\^, \fIfeedbackclass\fP\^, \fIfeedbackid\fP\^, \fIpercent\fP\^)
.br
Display *\fIdisplay\fP\^;
.br
XDevice *\fIdevice\fP\^;
.br
XID *\fIfeedbackclass\fP\^;
.br
XID *\fIfeedbackid\fP\^;
.br
int *\fIpercent\fP\^;
.br
.SH ARGUMENTS
.TP 12
.I display
Specifies the connection to the X server.
.TP 12
.I device
Specifies the device with which the bell is associated.
.TP 12
.I feedbackclass
Specifies the class of the feedback with which the bell is associated.
.TP 12
.I feedbackid
Specifies the id of the feedback with which the bell is associated.
.TP 12
.I percent
Specifies the volume in the range -100 to 100 at which the bell should be rung.
.SH DESCRIPTION
The \fIXDeviceBell\fP request causes the server to ring a bell on the
specified feedback of the specified device, if possible.
The specified volume is relative to the base volume for the bell.
If an invalid device is specified,
a \fIBadDevice\fP error will be returned. The feedbackclass and feedbackid
parameters contain values returned by an \fIXGetFeedbackControl\fP request
and uniquely identify the bell to ring. If a feedbackclass is specified that
does not support a bell, or if a nonexistent feedbackid is specified,
or a percent value is specified that is not in the range -100 to 100,
a \fIBadValue\fP error will be returned.
.LP
The volume at which the bell is rung when the percent argument is
nonnegative is:
.IP
base \- [(base * percent) / 100] + percent
.LP
The volume at which the bell rings
when the percent argument is negative is:
.IP
base + [(base * percent) / 100]
.LP
To change the base volume of the bell, use \fIXChangeFeedbackControl\fP.
.LP
\fIXDeviceBell\fP can generate a \fIBadDevice\fP or a \fIBadValue\fP
error.
.SH DIAGNOSTICS
.TP 12
\fIBadDevice\fP
An invalid device was specified. The specified device does not exist, or has
not been opened by this client via \fIXOpenInputDevice\fP.
.TP 12
\fIBadValue\fP
An invalid feedbackclass, feedbackid, or percent value was specified.
.SH "SEE ALSO"
XChangeFeedbackControl(3X),
XBell(3X)
.br
\fI\*(xL\fP
.\"
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
.\"
.\" Permission to use, copy, modify, distribute, and sell this documentation
.\" for any purpose and without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\" Ardent, and Hewlett-Packard make no representations about the
.\" suitability for any purpose of the information in this document. It is
.\" provided \`\`as is'' without express or implied warranty.
.\"
.\" $Xorg: XChDCtl.man,v 1.4 2001/03/16 17:51:13 pookie Exp $
.ds xL Programming With Xlib
.TH XGetDeviceControl 3X11 "Release 6.6" "X Version 11" "X FUNCTIONS"
.SH NAME
XGetDeviceControl, XChangeDeviceControl \- query and change input device controls
.SH SYNTAX
XDeviceControl *
XGetDeviceControl\^(\^\fIdisplay\fP, \fIdevice\fP\^, \fIcontrol\fP\^)
.br
Display *\fIdisplay\fP\^;
.br
XDevice *\fIdevice\fP\^;
.br
int *\fIcontrolType\fP\^;
.br
.sp
int XChangeDeviceControl\^(\^\fIdisplay\fP, \fIdevice\fP\^, \fIcontrolType\fP\^, \fIcontrol\fP\^)
.br
Display *\fIdisplay\fP\^;
.br
XDevice *\fIdevice\fP\^;
.br
int \fIcontrolType\fP\^;
.br
XDeviceControl *\fIcontrol\fP\^;
.SH ARGUMENTS
.TP 15
.I display
Specifies the connection to the X server.
.TP 15
.I device
Specifies the device whose control is to be interrogated or modified.
.TP 15
.I controlType
Specifies the type of control to be interrogated or changed.
.TP 15
.I control
Specifies the address of an \fIXDeviceControl\fP structure that contains
the new values for the Device.
.SH DESCRIPTION
These requests are provided to manipulate those input devices that
support device control. A \fIBadMatch\fP error will be generated if the
requested device does not support any device controls.
.LP
Valid device control types that can be used with these requests include the
following:
.TP 20
DEVICE_RESOLUTION
Queries or changes the resolution of valuators on input devices.
.LP
The \fIXGetDeviceControl\fP request returns a pointer to an
\fIXDeviceControl\fP structure.
.LP
\fIXGetDeviceControl\fP can generate a \fIBadDevice\fP or
\fIBadMatch\fP error.
.LP
The \fIXChangeDeviceControl\fP request modifies the values of one
control on the specified device. The control is identified by the id
field of the \fIXDeviceControl\fP structure that is passed with the
request.
.LP
\fIXChangeDeviceControl\fP can generate a \fIBadDevice\fP,
\fIBadMatch\fP, or \fIBadValue\fP error.
.SH STRUCTURES
Each control is described by a structure specific to that control.
These structures are defined in the file \fIXInput.h\fP.
.LP
\fIXDeviceControl\fP is a generic
structure that contains two fields that are at the beginning of each class
of control:
.LP
.DS
.nf
typedef struct {
.br
XID class;
.br
int length;
.br
} XDeviceControl;
.fi
.DE
.LP
The \fIXDeviceResolutionState\fP structure defines the information that is
returned for device resolution for devices with valuators.
.LP
.DS
.nf
typedef struct {
XID control;
int length;
int num_valuators;
int *resolutions;
int *min_resolutions;
int *max_resolutions;
} XDeviceResolutionState;
.fi
.DE
.LP
The \fIXDeviceResolutionControl\fP structure defines the attributes that can be
controlled for keyboard Devices.
.LP
.DS
.nf
typedef struct {
XID control;
int length;
int first_valuator;
int num_valuators;
int *resolutions;
} XDeviceResolutionControl;
.fi
.DE
.SH DIAGNOSTICS
.TP 12
\fIBadDevice\fP
An invalid device was specified. The specified device does not exist or has
not been opened by this client via \fIXOpenInputDevice\fP. This error may
also occur if some other client has caused the specified device to become
the X keyboard or X pointer device via the \fIXChangeKeyboardDevice\fP or
\fIXChangePointerDevice\fP requests.
.TP 12
\fIBadMatch\fP
This error may occur if an \fIXGetDeviceControl\fP request was made specifying
a device that has no controls or an \fIXChangeDeviceControl\fP request was
made with an \fIXDeviceControl\fP structure that contains an invalid Device
type. It may also occur if an invalid combination of mask bits is specified
(\fIDvKey\fP but no \fIDvAutoRepeatMode\fP for keyboard Devices), or if an
invalid KeySym is specified for a string Device.
.TP 12
\fIBadValue\fP
Some numeric value falls outside the range of values accepted by the
\fIXChangeDeviceControl\fP request.
Unless a specific range is specified for an argument, the full range defined
by the argument's type is accepted. Any argument defined as a set of
alternatives can generate this error.
.SH "SEE ALSO"
.br
\fI\*(xL\fP
.\"
.\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer,
.\"
.\" Permission to use, copy, modify, distribute, and sell this documentation
.\" for any purpose and without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\" Ardent, and Hewlett-Packard make no representations about the
.\" suitability for any purpose of the information in this document. It is
.\" provided \`\`as is'' without express or implied warranty.
.\"
.\" $Xorg: XChKMap.man,v 1.4 2001/03/16 17:51:13 pookie Exp $
.ds xL Programming with Xlib
.TH XGetDeviceKeyMapping 3X11 "Release 6.6" "X Version 11" "X FUNCTIONS"
.SH NAME
XGetDeviceKeyMapping, XChangeDeviceKeyMapping \- query or change device key mappings
.SH SYNTAX
\fB
XChangeDeviceKeyMapping(\^\fIdisplay\fP, \fIdevice\fP, \fIfirst_keycode\fP,
\fIkeysyms_per_keycode\fP, \fIkeysyms\fP, \fIkeycode_count\fP\^)
.nf
Display *\fIdisplay\fP\^;
XDevice *\fIdevice\fP\^;
int \fIfirst_keycode\fP\^;
int \fIkeysyms_per_keycode\fP\^;
KeySym *\fIkeysyms\fP\^;
int \fIkeycode_count\fP\^;
KeySym *XGetDeviceKeyMapping(\^\fIdisplay\fP, \fIdevice\fP, \fIfirst_keycode\fP, \fIkeycode_count\fP,
\fIkeysyms_per_keycode_return\fP\^)
Display *\fIdisplay\fP\^;
XDevice *\fIdevice\fP\^;
KeyCode \fIfirst_keycode\fP\^;
int \fIkeycode_count\fP\^;
int *\fIkeysyms_per_keycode_return\fP\^;
.fi
\fP
.SH ARGUMENTS
.TP 12
.I display
Specifies the connection to the X server.
.TP 12
.I device
Specifies the device whose key mapping is to be queried or modified.
.TP 12
.I first_keycode
Specifies the first KeyCode to be returned.
.TP 12
.I keycode_count
Specifies the number of KeyCodes to be returned or modified.
.TP 12
.I keysyms_per_keycode
Specifies the number of KeySyms per KeyCode.
.TP 12
.I keysyms_per_keycode_return
Specifies the address of a variable into which the number of KeySyms per KeyCode
will be returned.
.TP 12
.I keysyms
Specifies the address of an array of KeySyms.
.SH DESCRIPTION
For the specified device,
the \fIXGetDeviceKeyMapping\fP request returns
the symbols for the specified number of KeyCodes
starting with first_keycode.
The value specified in first_keycode must be greater than
or equal to min_keycode as returned by
\fIXListInputDevices\fP,
or a
\fIBadValue\fP
error results.
In addition, the following expression must be less than or equal
to max_keycode as returned by
\fIXListInputDevices\fP:
.LP
.DS
first_keycode + keycode_count \- 1
.DE
.LP
If this is not the case, a
\fIBadValue\fP
error results.
The number of elements in the KeySyms list is:
.LP
.DS
keycode_count * keysyms_per_keycode_return
.DE
.LP
KeySym number N, counting from zero, for KeyCode K has the following index
in the list, counting from zero:
.DS
(K \- first_code) * keysyms_per_code_return + N
.DE
.LP
The X server arbitrarily chooses the keysyms_per_keycode_return value
to be large enough to report all requested symbols.
A special KeySym value of
\fINoSymbol\fP
is used to fill in unused elements for
individual KeyCodes.
To free the storage returned by
\fIXGetDeviceKeyMapping\fP,
use
\fIXFree\fP.
.LP
If the specified device does not support input class keys, a \fIBadMatch\fP
error will result.
.LP
\fIXGetDeviceKeyMapping\fP
can generate a \fIBadDevice\fP, \fIBadMatch\fP, or \fIBadValue\fP
error.
.LP
For the specified device, the \fIXChangeDeviceKeyMapping\fP
request defines the symbols for the specified number of KeyCodes
starting with first_keycode.
The symbols for KeyCodes outside this range remain unchanged.