489 lines
7.0 KiB
HTML
489 lines
7.0 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of XGETDEVICEKEYMAPPING</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>XGETDEVICEKEYMAPPING</H1>
|
|
Section: (3)<BR>Updated: 06/19/2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
XGetDeviceKeyMapping, XChangeDeviceKeyMapping - query or change device key mappings
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
<PRE>
|
|
#include <<A HREF="file:///usr/include/X11/extensions/XInput.h">X11/extensions/XInput.h</A>>
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
KeySym *XGetDeviceKeyMapping( Display *display,
|
|
XDevice *device,
|
|
KeyCode first_keycode,
|
|
int keycode_count,
|
|
int *keysyms_per_keycode_return);
|
|
display
|
|
Specifies the connection to the X server.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
device
|
|
Specifies the device whose key mapping is to be queried
|
|
or modified.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
first_keycode
|
|
Specifies the first KeyCode to be returned.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
keycode_count
|
|
Specifies the number of KeyCodes to be returned or
|
|
modified.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
keysyms_per_keycode
|
|
Specifies the number of KeySyms per KeyCode.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
keysyms_per_keycode_return
|
|
Specifies the address of a variable into which the
|
|
number of KeySyms per KeyCodewill be returned.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
keysyms
|
|
Specifies the address of an array of KeySyms.
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
For the specified device, the XGetDeviceKeyMapping 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 XListInputDevices, or a BadValue error results. In
|
|
addition, the following expression must be less than or equal
|
|
to max_keycode as returned by XListInputDevices:
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
first_keycode + keycode_count - 1
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
If this is not the case, a BadValue error results. The number
|
|
of elements in the KeySyms list is:
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
keycode_count * keysyms_per_keycode_return
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
KeySym number N, counting from zero, for KeyCode K has the
|
|
following index in the list, counting from zero: (K -
|
|
first_code) * keysyms_per_code_return + N
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
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 NoSymbol is used to fill in unused
|
|
elements for individual KeyCodes. To free the storage returned
|
|
by XGetDeviceKeyMapping, use XFree.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
If the specified device does not support input class keys, a
|
|
BadMatch error will result.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XGetDeviceKeyMapping can generate a BadDevice, BadMatch, or
|
|
BadValue error.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
For the specified device, the XChangeDeviceKeyMapping request
|
|
defines the symbols for the specified number of KeyCodes
|
|
starting with first_keycode. The symbols for KeyCodes outside
|
|
this range remain unchanged. The number of elements in keysyms
|
|
must be:
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
num_codes * keysyms_per_keycode
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The specified first_keycode must be greater than or equal to
|
|
min_keycode returned by XListInputDevices, or a BadValue error
|
|
results. In addition, the following expression must be less
|
|
than or equal to max_keycode as returned by XListInputDevices,
|
|
or a BadValue error results:
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="12"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
first_keycode + num_codes - 1
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="13"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
KeySym number N, counting from zero, for KeyCode K has the
|
|
following index in keysyms, counting from zero:
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="14"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
(K - first_keycode) * keysyms_per_keycode + N
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="15"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The specified keysyms_per_keycode can be chosen arbitrarily by
|
|
the client to be large enough to hold all desired symbols. A
|
|
special KeySym value of NoSymbol should be used to fill in
|
|
unused elements for individual KeyCodes. It is legal for
|
|
NoSymbol to appear in nontrailing positions of the effective
|
|
list for a KeyCode.XChangeDeviceKeyMapping generates a
|
|
DeviceMappingNotify event that is sent to all clients that have
|
|
selected that type of event.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="16"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
There is no requirement that the X server interpret this
|
|
mapping. It is merely stored for reading and writing by
|
|
clients.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="17"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
If the specified device does not support input class keys, a
|
|
BadMatch error results.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="18"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XChangeDeviceKeyMapping can generate a BadDevice, BadMatch,
|
|
BadAlloc, or BadValue error.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>DIAGNOSTICS</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="19"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadDevice
|
|
An invalid device was specified. The specified device
|
|
does not exist or has not been opened by this client via
|
|
XOpenInputDevice. This error may also occur if the
|
|
specified device is the X keyboard or X pointer device.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="20"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadMatch
|
|
This error may occur if an XGetDeviceKeyMapping or
|
|
XChangeDeviceKeyMapping request was made specifying a
|
|
device that has no keys.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="21"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadValue
|
|
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.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="22"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadAlloc
|
|
The server failed to allocate the requested resource or
|
|
server memory.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="23"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
<A HREF="/cgi-bin/man/man2html?3+XSetDeviceButtonMapping">XSetDeviceButtonMapping</A>(3), XSetDeviceModifierMapping(__3_)
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="24"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="25"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="26"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="27"><A HREF="#lbAE">DIAGNOSTICS</A><DD>
|
|
<DT id="28"><A HREF="#lbAF">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:00 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|