1XGetDeviceModifierMapping(3)      X FUNCTIONS     XGetDeviceModifierMapping(3)
2
3
4

NAME

6       XGetDeviceModifierMapping,  XSetDeviceModifierMapping - query or change
7       device modifier mappings
8

SYNTAX

10
11
12       int XSetDeviceModifierMapping(Display *display, XDevice *device, XModi‐
13              fierKeymap  *modmap);
14
15       XModifierKeymap  *XGetDeviceModifierMapping(Display  *display,  XDevice
16              *device);
17
18

ARGUMENTS

20       display     Specifies the connection to the X server.
21
22       device      Specifies the  device  whose  modifier  mapping  is  to  be
23                   queried or modified.
24
25       modmap      Specifies a pointer to the XModifierKeymap structure.
26

DESCRIPTION

28       The  XSetDeviceModifierMapping  request  specifies  the KeyCodes of the
29       keys (if any) that are to  be  used  as  modifiers  for  the  specified
30       device.   If  it succeeds, the X server generates a DeviceMappingNotify
31       event, and XSetDeviceModifierMapping returns MappingSuccess.  X permits
32       at  most  eight modifier keys.  If more than eight are specified in the
33       XModifierKeymap structure, a BadLength error results.
34
35       The modifiermap member of the XModifierKeymap structure contains  eight
36       sets  of  max_keypermod  KeyCodes,  one  for each modifier in the order
37       Shift, Lock, Control, Mod1, Mod2, Mod3, Mod4, and Mod5.   Only  nonzero
38       KeyCodes  have  meaning in each set, and zero KeyCodes are ignored.  In
39       addition, all of the nonzero KeyCodes must be in the range specified by
40       min_keycode and max_keycode as returned by XListInputDevices, or a Bad‐
41       Value error results.  No KeyCode may appear twice in the entire map, or
42       a BadValue error results.
43
44       An  X  server  can impose restrictions on how modifiers can be changed,
45       for example, if certain keys do not generate up  transitions  in  hard‐
46       ware, if auto-repeat cannot be disabled on certain keys, or if multiple
47       modifier keys are not supported.  If some such restriction is violated,
48       the  status  reply  is  MappingFailed,  and  none  of the modifiers are
49       changed.  If the new KeyCodes specified  for  a  modifier  differ  from
50       those currently defined and any (current or new) keys for that modifier
51       are in the logically down state, XSetDeviceModifierMapping returns Map‐
52       pingBusy, and none of the modifiers is changed.
53
54       XSetDeviceModifierMapping can generate BadLengthP, BadDevice, BadMatch,
55       BadAlloc, and BadValue errors.
56
57       The XGetDeviceModifierMapping request returns a pointer to a newly cre‐
58       ated  XModifierKeymap  structure  that  contains the keys being used as
59       modifiers.   The  structure  should  be  freed  after  use  by  calling
60       XFreeModifierMapping  .   If only zero values appear in the set for any
61       modifier, that modifier is disabled.
62
63       XGetDeviceModifierMapping can generate BadDevice and BadMatch errors.
64

STRUCTURES

66       The XModifierKeymap structure contains:
67
68       typedef struct {
69            int max_keypermod;
70            KeyCode *modifiermap;
71       } XModifierKeymap;
72

DIAGNOSTICS

74       BadLength   More than eight keys were specified in the  XModifierKeymap
75                   structure.
76
77       BadAlloc    The  server  failed  to  allocate the requested resource or
78                   server memory.
79
80       BadDevice   An invalid device was specified.  The specified device does
81                   not  exist or has not been opened by this client via XOpen‐
82                   InputDevice.  This error may also occur  if  the  specified
83                   device is the X keyboard or X pointer device.
84
85       BadMatch    This  error  may  occur  if an XGetDeviceModifierMapping or
86                   XChangeDeviceModifierMapping request was made specifying  a
87                   device that has no keys.
88
89       BadValue    Some  numeric  value  falls  outside  the  range  of values
90                   accepted by the request.  Unless a specific range is speci‐
91                   fied  for  an argument, the full range defined by the argu‐
92                   ment's type is accepted.  Any argument defined as a set  of
93                   alternatives can generate this error.
94

SEE ALSO

96       XSetDeviceKeyMapping(3)
97       XSetDeviceButtonMapping(3)
98       Programming With Xlib
99
100
101
102X Version 11                      libXi 1.1.1     XGetDeviceModifierMapping(3)
Impressum