2 .\" Title: xgetdevicemodifiermapping
3 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
6 .\" Manual: [FIXME: manual]
7 .\" Source: [FIXME: source]
10 .TH "XGETDEVICEMODIFIERMA" "libmansuffix" "09/07/2010" "[FIXME: source]" "[FIXME: manual]"
11 .\" -----------------------------------------------------------------
12 .\" * set default formatting
13 .\" -----------------------------------------------------------------
14 .\" disable hyphenation
16 .\" disable justification (adjust text to left margin only)
18 .\" -----------------------------------------------------------------
19 .\" * MAIN CONTENT STARTS HERE *
20 .\" -----------------------------------------------------------------
22 XGetDeviceModifierMapping, XSetDeviceModifierMapping \- query or change device modifier mappings
26 #include <X11/extensions/XInput\&.h>
30 int XSetDeviceModifierMapping( Display *display,
32 XModifierKeymap *modmap);
36 XModifierKeymap *XGetDeviceModifierMapping( Display *display,
42 Specifies the connection to the X server\&.
47 Specifies the device whose modifier mapping is to be
48 queried or modified\&.
53 Specifies a pointer to the XModifierKeymap structure\&.
61 The XSetDeviceModifierMapping request specifies the KeyCodes of
62 the keys (if any) that are to be used as modifiers for the
63 specified device\&. If it succeeds, the X server generates a
64 DeviceMappingNotify event, and XSetDeviceModifierMapping
65 returns MappingSuccess\&. X permits at most eight modifier keys\&.
66 If more than eight are specified in the XModifierKeymap
67 structure, a BadLength error results\&.
77 The modifiermap member of the XModifierKeymap structure
78 contains eight sets of max_keypermod KeyCodes, one for each
79 modifier in the order Shift, Lock, Control, Mod1, Mod2, Mod3,
80 Mod4, and Mod5\&. Only nonzero KeyCodes have meaning in each set,
81 and zero KeyCodes are ignored\&. In addition, all of the nonzero
82 KeyCodes must be in the range specified by min_keycode and
83 max_keycode as returned by XListInputDevices, or a BadValue
84 error results\&. No KeyCode may appear twice in the entire map,
85 or a BadValue error results\&.
95 An X server can impose restrictions on how modifiers can be
96 changed, for example, if certain keys do not generate up
97 transitions in hardware, if auto\-repeat cannot be disabled on
98 certain keys, or if multiple modifier keys are not supported\&.
99 If some such restriction is violated, the status reply is
100 MappingFailed, and none of the modifiers are changed\&. If the
101 new KeyCodes specified for a modifier differ from those
102 currently defined and any (current or new) keys for that
103 modifier are in the logically down state,
104 XSetDeviceModifierMapping returns MappingBusy, and none of the
105 modifiers is changed\&.
115 XSetDeviceModifierMapping can generate BadLength, BadDevice,
116 BadMatch, BadAlloc, and BadValue errors\&.
126 The XGetDeviceModifierMapping request returns a pointer to a
127 newly created XModifierKeymap structure that contains the keys
128 being used as modifiers\&. The structure should be freed after
129 use by calling XFreeModifierMapping \&. If only zero values
130 appear in the set for any modifier, that modifier is disabled\&.
140 XGetDeviceModifierMapping can generate BadDevice and BadMatch
153 The XModifierKeymap structure contains:
165 KeyCode *modifiermap;
178 More than eight keys were specified in the
179 XModifierKeymap structure\&.
190 The server failed to allocate the requested resource or
202 An invalid device was specified\&. The specified device
203 does not exist or has not been opened by this client via
204 XOpenInputDevice\&. This error may also occur if the
205 specified device is the X keyboard or X pointer device\&.
216 This error may occur if an XGetDeviceModifierMapping or
217 XChangeDeviceModifierMapping request was made specifying
218 a device that has no keys\&.
229 Some numeric value falls outside the range of values
230 accepted by the request\&. Unless a specific range is
231 specified for an argument, the full range defined by the
232 argument\'s type is accepted\&. Any argument defined as a
233 set of alternatives can generate this error\&.
244 XSetDeviceKeyMapping(libmansuffix), XSetDeviceButtonMapping(libmansuffix)