2 .\" Title: xgetdevicemodifiermapping
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 "XGETDEVICEMODIFIERMA" "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 XGetDeviceModifierMapping, XSetDeviceModifierMapping \- query or change device modifier mappings
35 #include <X11/extensions/XInput\&.h>
39 int XSetDeviceModifierMapping( Display *display,
41 XModifierKeymap *modmap);
45 XModifierKeymap *XGetDeviceModifierMapping( Display *display,
51 Specifies the connection to the X server\&.
56 Specifies the device whose modifier mapping is to be
57 queried or modified\&.
62 Specifies a pointer to the XModifierKeymap structure\&.
70 The XSetDeviceModifierMapping request specifies the KeyCodes of
71 the keys (if any) that are to be used as modifiers for the
72 specified device\&. If it succeeds, the X server generates a
73 DeviceMappingNotify event, and XSetDeviceModifierMapping
74 returns MappingSuccess\&. X permits at most eight modifier keys\&.
75 If more than eight are specified in the XModifierKeymap
76 structure, a BadLength error results\&.
86 The modifiermap member of the XModifierKeymap structure
87 contains eight sets of max_keypermod KeyCodes, one for each
88 modifier in the order Shift, Lock, Control, Mod1, Mod2, Mod3,
89 Mod4, and Mod5\&. Only nonzero KeyCodes have meaning in each set,
90 and zero KeyCodes are ignored\&. In addition, all of the nonzero
91 KeyCodes must be in the range specified by min_keycode and
92 max_keycode as returned by XListInputDevices, or a BadValue
93 error results\&. No KeyCode may appear twice in the entire map,
94 or a BadValue error results\&.
104 An X server can impose restrictions on how modifiers can be
105 changed, for example, if certain keys do not generate up
106 transitions in hardware, if auto\-repeat cannot be disabled on
107 certain keys, or if multiple modifier keys are not supported\&.
108 If some such restriction is violated, the status reply is
109 MappingFailed, and none of the modifiers are changed\&. If the
110 new KeyCodes specified for a modifier differ from those
111 currently defined and any (current or new) keys for that
112 modifier are in the logically down state,
113 XSetDeviceModifierMapping returns MappingBusy, and none of the
114 modifiers is changed\&.
124 XSetDeviceModifierMapping can generate BadLength, BadDevice,
125 BadMatch, BadAlloc, and BadValue errors\&.
135 The XGetDeviceModifierMapping request returns a pointer to a
136 newly created XModifierKeymap structure that contains the keys
137 being used as modifiers\&. The structure should be freed after
138 use by calling XFreeModifierMapping \&. If only zero values
139 appear in the set for any modifier, that modifier is disabled\&.
149 XGetDeviceModifierMapping can generate BadDevice and BadMatch
162 The XModifierKeymap structure contains:
174 KeyCode *modifiermap;
187 More than eight keys were specified in the
188 XModifierKeymap structure\&.
199 The server failed to allocate the requested resource or
211 An invalid device was specified\&. The specified device
212 does not exist or has not been opened by this client via
213 XOpenInputDevice\&. This error may also occur if the
214 specified device is the X keyboard or X pointer device\&.
225 This error may occur if an XGetDeviceModifierMapping or
226 XChangeDeviceModifierMapping request was made specifying
227 a device that has no keys\&.
238 Some numeric value falls outside the range of values
239 accepted by the request\&. Unless a specific range is
240 specified for an argument, the full range defined by the
241 argument\*(Aqs type is accepted\&. Any argument defined as a
242 set of alternatives can generate this error\&.
253 XSetDeviceKeyMapping(libmansuffix), XSetDeviceButtonMapping(libmansuffix)