1XkbChangeTypesOfKey(3)           XKB FUNCTIONS          XkbChangeTypesOfKey(3)
2
3
4

NAME

6       XkbChangeTypesOfKey  -  Change the number of groups and the types bound
7       to a key
8

SYNOPSIS

10       Status XkbChangeTypesOfKey (XkbDescPtr xkb, int key, int n_groups,  un‐
11              signed   int   groups,   int   *new_types_in,   XkbMapChangesPtr
12              p_changes);
13

ARGUMENTS

15       xkb    keyboard description to be changed
16
17       key    keycode for key of interest
18
19       n_groups
20              new number of groups for key
21
22       groups mask indicating groups to change
23
24       new_types_in
25              indices for new groups specified in groups
26
27       p_changes
28              notes changes made to xkb
29

DESCRIPTION

31       XkbChangeTypesOfKey reallocates the symbols and actions  bound  to  the
32       key, if necessary, and initializes any new symbols or actions to NoSym‐
33       bol or NoAction, as appropriate. If  the  p_changes  parameter  is  not
34       NULL,  XkbChangeTypesOfKey adds the XkbKeySymsMask to the changes field
35       of p_changes and modifies the first_key_sym and num_key_syms fields  of
36       p_changes  to  include the key that was changed. See STRUCTURE for more
37       information on  the  XkbMapChangesPtr  structure.  If  successful,  Xk‐
38       bChangeTypesOfKey returns Success.
39
40       The  n_groups parameter specifies the new number of groups for the key.
41       The groups parameter is a mask specifying  the  groups  for  which  new
42       types  are  supplied  and  is  a  bitwise inclusive OR of the following
43       masks: XkbGroup1Mask, XkbGroup2Mask, XkbGroup3Mask, and XkbGroup4Mask.
44
45       The new_types_in parameter is an  integer  array  of  length  n_groups.
46       Each  entry  represents the type to use for the associated group and is
47       an index into xkb->map->types.  The new_types_in array  is  indexed  by
48       group  index;  if  n_groups  is four and groups only has Group1Mask and
49       Group3Mask set, new_types_in looks like this:
50
51           new_types_in[0] = type for Group1
52           new_types_in[1] = ignored
53           new_types_in[2] = type for Group3
54           new_types_in[3] = ignored
55
56       For convenience, Xkb provides the following constants to use as indices
57       to the groups:
58
59
60       Table 1 Group Index Constants
61       ──────────────────────────────
62       Constant Name       Value
63       ──────────────────────────────
64       XkbGroup1Index      0
65       XkbGroup2Index      1
66
67       XkbGroup3Index      2
68       XkbGroup4Index      3
69
70       If  the Xkb extension has not been properly initialized, XkbChangeType‐
71       sOfKey returns BadAccess. If the xkb parameter it not valid  (that  is,
72       it  is  NULL or it does not contain a valid client map), XkbChangeType‐
73       sOfKey returns BadMatch. If the key is not a valid keycode, n_groups is
74       greater  than  XkbNumKbdGroups, or the groups mask does not contain any
75       of the valid group mask bits, XkbChangeTypesOfKey returns BadValue.  If
76       it is necessary to resize the key symbols or key actions arrays and any
77       allocation errors occur, XkbChangeTypesOfKey returns BadAlloc.
78

STRUCTURES

80       Use the XkbMapChangesRec structure to identify and track partial  modi‐
81       fications to the mapping components and to reduce the amount of traffic
82       between the server and clients.
83
84       typedef struct _XkbMapChanges {
85           unsigned short   changed;            /* identifies valid components in structure */
86           KeyCode          min_key_code;       /* lowest numbered keycode for device */
87           KeyCode          max_key_code;       /* highest numbered keycode for device */
88           unsigned char    first_type;         /* index of first key type modified */
89           unsigned char    num_types;          /* # types modified */
90           KeyCode          first_key_sym;      /* first key whose key_sym_map changed */
91           unsigned char    num_key_syms;       /* # key_sym_map entries changed */
92           KeyCode          first_key_act;      /* first key whose key_acts entry changed */
93           unsigned char    num_key_acts;       /* # key_acts entries changed */
94           KeyCode          first_key_behavior; /* first key whose behaviors changed */
95           unsigned char    num_key_behaviors;  /* # behaviors entries changed */
96           KeyCode          first_key_explicit; /* first key whose explicit entry changed */
97           unsigned char    num_key_explicit;   /* # explicit entries changed */
98           KeyCode          first_modmap_key;   /* first key whose modmap entry changed */
99           unsigned char    num_modmap_keys;    /* # modmap entries changed */
100           KeyCode          first_vmodmap_key;  /* first key whose vmodmap changed */
101           unsigned char    num_vmodmap_keys;   /* # vmodmap entries changed */
102           unsigned char    pad1;               /* reserved */
103           unsigned short   vmods;              /* mask indicating which vmods changed */
104       } XkbMapChangesRec,*XkbMapChangesPtr;
105
106

DIAGNOSTICS

108       BadAccess      The Xkb extension has not been properly initialized
109
110       BadAlloc       Unable to allocate storage
111
112       BadMatch       A compatible version of Xkb was  not  available  in  the
113                      server or an argument has correct type and range, but is
114                      otherwise invalid
115
116       BadValue       An argument is out of range
117
118
119
120X Version 11                     libX11 1.8.7           XkbChangeTypesOfKey(3)
Impressum