260 lines
4.7 KiB
HTML
260 lines
4.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of XSETDEVICEBUTTONMAPP</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>XSETDEVICEBUTTONMAPP</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>
|
|
|
|
XSetDeviceButtonMapping, XGetDeviceButtonMapping - query or change device button 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>
|
|
int XSetDeviceButtonMapping( Display *display,
|
|
XDevice *device,
|
|
unsigned char map[],
|
|
int nmap);
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
int XGetDeviceButtonMapping( Display *display,
|
|
XDevice *device,
|
|
unsigned char map_return[],
|
|
int nmap);
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
display
|
|
Specifies the connection to the X server.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
device
|
|
Specifies the device whose button mapping is to be
|
|
queried or changed.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
map
|
|
Specifies the mapping list.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
map_return
|
|
Returns the mapping list.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
nmap
|
|
Specifies the number of items in the mapping list.
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XSetDeviceButtonMapping request sets the mapping of the
|
|
specified device. If it succeeds, the X server generates a
|
|
DeviceMappingNotify event, and XSetDeviceButtonMapping returns
|
|
MappingSuccess. Element map[i] defines the logical button
|
|
number for the physical button i+1. The length of the list must
|
|
be the same as XGetDeviceButtonMapping would return, or a
|
|
BadValue error results. A zero element disables a button, and
|
|
elements are not restricted in value by the number of physical
|
|
buttons. However, no two elements can have the same nonzero
|
|
value, or a BadValue error results. If any of the buttons to be
|
|
altered are logically in the down state,
|
|
XSetDeviceButtonMapping returns MappingBusy, and the mapping is
|
|
not changed.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XSetDeviceButtonMapping can generate BadDevice, BadMatch, and
|
|
BadValue errors.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The XGetDeviceButtonMapping request returns the current mapping
|
|
of the specified device. Buttons are numbered starting from
|
|
one.XGetDeviceButtonMapping returns the number of physical
|
|
buttons actually on the device. The nominal mapping for a
|
|
device is map[i]=i+1. The nmap argument specifies the length of
|
|
the array where the device mapping is returned, and only the
|
|
first nmap elements are returned in map_return.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XGetDeviceButtonMapping can generate BadDevice or BadMatch
|
|
errors.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>DIAGNOSTICS</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="5"><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="6"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadMatch
|
|
This error may occur if an XGetDeviceButtonMapping or
|
|
XSetDeviceButtonMapping request was made specifying a
|
|
device that has no buttons.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="7"><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>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
<A HREF="/cgi-bin/man/man2html?3+XChangeDeviceKeyboardControl">XChangeDeviceKeyboardControl</A>(3), <A HREF="/cgi-bin/man/man2html?3+XChangeDeviceKeyMapping">XChangeDeviceKeyMapping</A>(3),
|
|
<A HREF="/cgi-bin/man/man2html?3+XChangeDeviceModifierMapping">XChangeDeviceModifierMapping</A>(3)
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="9"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="10"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="11"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="12"><A HREF="#lbAE">DIAGNOSTICS</A><DD>
|
|
<DT id="13"><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:01 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|