Debian Codegraph @

man/XGetDeviceModifierMapping.txt

raw
1 XGETDEVICEMODIFIERMAPPING(libmansuffix)
2 =======================================
3
4 NAME
5 ----
6
7 XGetDeviceModifierMapping, XSetDeviceModifierMapping - query or
8 change device modifier mappings
9
10 SYNOPSIS
11 --------
12
13 #include <X11/extensions/XInput.h>
14
15 int XSetDeviceModifierMapping( Display *display,
16 XDevice *device,
17 XModifierKeymap *modmap);
18
19 XModifierKeymap *XGetDeviceModifierMapping( Display *display,
20 XDevice *device);
21
22 display
23 Specifies the connection to the X server.
24
25 device
26 Specifies the device whose modifier mapping is to be
27 queried or modified.
28
29 modmap
30 Specifies a pointer to the XModifierKeymap structure.
31
32 DESCRIPTION
33 -----------
34
35 The XSetDeviceModifierMapping request specifies the KeyCodes of
36 the keys (if any) that are to be used as modifiers for the
37 specified device. If it succeeds, the X server generates a
38 DeviceMappingNotify event, and XSetDeviceModifierMapping
39 returns MappingSuccess. X permits at most eight modifier keys.
40 If more than eight are specified in the XModifierKeymap
41 structure, a BadLength error results.
42
43 The modifiermap member of the XModifierKeymap structure
44 contains eight sets of max_keypermod KeyCodes, one for each
45 modifier in the order Shift, Lock, Control, Mod1, Mod2, Mod3,
46 Mod4, and Mod5. Only nonzero KeyCodes have meaning in each set,
47 and zero KeyCodes are ignored. In addition, all of the nonzero
48 KeyCodes must be in the range specified by min_keycode and
49 max_keycode as returned by XListInputDevices, or a BadValue
50 error results. No KeyCode may appear twice in the entire map,
51 or a BadValue error results.
52
53 An X server can impose restrictions on how modifiers can be
54 changed, for example, if certain keys do not generate up
55 transitions in hardware, if auto-repeat cannot be disabled on
56 certain keys, or if multiple modifier keys are not supported.
57 If some such restriction is violated, the status reply is
58 MappingFailed, and none of the modifiers are changed. If the
59 new KeyCodes specified for a modifier differ from those
60 currently defined and any (current or new) keys for that
61 modifier are in the logically down state,
62 XSetDeviceModifierMapping returns MappingBusy, and none of the
63 modifiers is changed.
64
65 XSetDeviceModifierMapping can generate BadLength, BadDevice,
66 BadMatch, BadAlloc, and BadValue errors.
67
68 The XGetDeviceModifierMapping request returns a pointer to a
69 newly created XModifierKeymap structure that contains the keys
70 being used as modifiers. The structure should be freed after
71 use by calling XFreeModifierMapping . If only zero values
72 appear in the set for any modifier, that modifier is disabled.
73
74 XGetDeviceModifierMapping can generate BadDevice and BadMatch
75 errors.
76
77 Structures
78
79 The XModifierKeymap structure contains:
80
81 typedef struct {
82 int max_keypermod;
83 KeyCode *modifiermap;
84 } XModifierKeymap;
85
86 DIAGNOSTICS
87 -----------
88
89 BadLength
90 More than eight keys were specified in the
91 XModifierKeymap structure.
92
93 BadAlloc
94 The server failed to allocate the requested resource or
95 server memory.
96
97 BadDevice
98 An invalid device was specified. The specified device
99 does not exist or has not been opened by this client via
100 XOpenInputDevice. This error may also occur if the
101 specified device is the X keyboard or X pointer device.
102
103 BadMatch
104 This error may occur if an XGetDeviceModifierMapping or
105 XChangeDeviceModifierMapping request was made specifying
106 a device that has no keys.
107
108 BadValue
109 Some numeric value falls outside the range of values
110 accepted by the request. Unless a specific range is
111 specified for an argument, the full range defined by the
112 argument's type is accepted. Any argument defined as a
113 set of alternatives can generate this error.
114
115 SEE ALSO
116 --------
117
118 XSetDeviceKeyMapping(libmansuffix), XSetDeviceButtonMapping(libmansuffix)