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

NAME

6       XkbKeyNumGroups  - Returns the number of groups of symbols bound to the
7       key corresponding to keycode
8

SYNOPSIS

10       int XkbKeyNumGroups (XkbDescPtr xkb, KeyCode keycode);
11

ARGUMENTS

13       - xkb  Xkb description of interest
14
15       - keycode
16              keycode of interest
17

DESCRIPTION

19       The group_info field of an XkbSymMapRec is an encoded value  containing
20       the  number of groups of symbols bound to the key as well as the speci‐
21       fication of the treatment of out-of-range groups. It is legal for a key
22       to  have  zero  groups,  in which case it also has zero symbols and all
23       events from that key yield NoSymbol.  To obtain the number of groups of
24       symbols bound to the key, use XkbKeyNumGroups.  To change the number of
25       groups bound to a key, use XkbChangeTypesOfKey.  To obtain a mask  that
26       determines  the  treatment  of out-of-range groups, use XkbKeyGroupInfo
27       and XkbOutOfRangeGroupInfo.
28
29       The keyboard controls contain a groups_wrap field specifying  the  han‐
30       dling  of illegal groups on a global basis. That is, when the user per‐
31       forms an action causing the effective group to  go  out  of  the  legal
32       range,  the  groups_wrap field specifies how to normalize the effective
33       keyboard group to a group that is legal for the keyboard  as  a  whole,
34       but  there is no guarantee that the normalized group will be within the
35       range of legal groups for any individual key.  The  per-key  group_info
36       field  specifies  how  a  key treats a legal effective group if the key
37       does not have a type specified for the group of concern.  For  example,
38       the  Enter key usually has just one group defined. If the user performs
39       an action causing the global keyboard group to change  to  Group2,  the
40       group_info  field for the Enter key describes how to handle this situa‐
41       tion.
42
43       Out-of-range groups for individual keys are mapped  to  a  legal  group
44       using  the same options as are used for the overall keyboard group. The
45       particular type of mapping used is controlled by the bits  set  in  the
46       group_info flag, as shown in Table 1.
47
48          Table 1 group_info Range Normalization
49       ──────────────────────────────────────────────
50       Bits set in group_info   Normalization method
51       ──────────────────────────────────────────────
52       XkbRedirectIntoRange     XkbRedirectIntoRange
53       XkbClampIntoRange        XkbClampIntoRange
54       none of the above        XkbWrapIntoRange
55
56       The  Xkb  extension is composed of two parts: a server extension, and a
57       client-side X library extension.  This chapter discusses functions used
58       to  modify controls effecting the behavior of the server portion of the
59       Xkb extension. X Library Controls discusses functions  used  to  modify
60       controls  that  affect  only  the behavior of the client portion of the
61       extension; those controls are known as Library Controls.
62
63       Xkb contains control features that affect the entire keyboard, known as
64       global  keyboard  controls.  Some  of  the  controls may be selectively
65       enabled and disabled; these controls are known as the Boolean Controls.
66       Boolean  Controls can be turned on or off under program control and can
67       also be automatically set to an on or off condition when a client  pro‐
68       gram  exits. The remaining controls, known as the Non-Boolean Controls,
69       are always active. The XkbControlsRec structure describes  the  current
70       state  of  most of the global controls and the attributes effecting the
71       behavior of each of these Xkb features. This chapter describes the  Xkb
72       controls and how to manipulate them.
73
74       There  are  two  possible  components for each of the Boolean Controls:
75       attributes describing how the control should work, and a state describ‐
76       ing  whether  the  behavior  as  a  whole  is enabled or disabled.  The
77       attributes and state for most of these controls are held in the XkbCon‐
78       trolsRec structure.
79
80       You can manipulate the Xkb controls individually, via convenience func‐
81       tions, or as a whole. To treat them as a group, modify  an  XkbControl‐
82       sRec structure to describe all of the changes to be made, and then pass
83       that structure and appropriate flags to an Xkb library function, or use
84       a  XkbControlsChangesRec to reduce network traffic. When using a conve‐
85       nience function to manipulate one control individually, you do not  use
86       an XkbControlsRec structure directly.
87
88       The Xkb controls are grouped as shown in Table 2.
89
90                       Table 2 Xkb Keyboard Controls
91       ───────────────────────────────────────────────────────────────
92
93       Type of Control        Control Name           Boolean Control?
94       ───────────────────────────────────────────────────────────────
95       Controls for           EnabledControls        No
96       enabling and           AutoReset              No
97       disabling other con‐
98       trols
99       ───────────────────────────────────────────────────────────────
100       Control for bell       AudibleBell            Boolean
101       behavior
102       ───────────────────────────────────────────────────────────────
103       Controls for repeat    PerKeyRepeat           No
104       key behavior           RepeatKeys             Boolean
105                              DetectableAutorepeat   Boolean
106       ───────────────────────────────────────────────────────────────
107       Controls for           Overlay1               Boolean
108       keyboard overlays      Overlay2               Boolean
109       ───────────────────────────────────────────────────────────────
110       Controls for using     MouseKeys              Boolean
111       the mouse from the     MouseKeysAccel         Boolean
112       keyboard
113       ───────────────────────────────────────────────────────────────
114                              AccessXFeedback        Boolean
115       Controls for better    AccessXKeys            Boolean
116       keyboard access by     AccessXTimeout         Boolean
117       physically impaired    BounceKeys             Boolean
118       persons                SlowKeys               Boolean
119                              StickyKeys             Boolean
120       ───────────────────────────────────────────────────────────────
121                              GroupsWrap             No
122       Controls for general   IgnoreGroupLock        Boolean
123       keyboard mapping       IgnoreLockMods         No
124                              InternalMods           No
125       ───────────────────────────────────────────────────────────────
126
127
128       The  individual  categories  and controls are described first, together
129       with functions for manipulating them.
130

STRUCTURES

132       The KeySymMapRec structure is defined as follows:
133
134           #define XkbNumKbdGroups             4
135           #define XkbMaxKbdGroup              (XkbNumKbdGroups-1)
136
137           typedef struct {                    /∗ map to keysyms for a single keycode
138       */
139               unsigned char       kt_index[XkbNumKbdGroups];  /∗ key type index for
140       each group */
141               unsigned char       group_info; /∗ # of groups and out of range group
142       handling */
143               unsigned char       width;      /∗ max # of shift levels for key */
144               unsigned short      offset;     /∗ index to keysym table in syms array
145       */
146           } XkbSymMapRec, *XkbSymMapPtr;
147
148
149       The XkbControlsRec structure is defined as follows:
150
151           #define XkbMaxLegalKeyCode     255
152           #define XkbPerKeyBitArraySize  ((XkbMaxLegalKeyCode+1)/8)
153
154
155           typedef struct {
156               unsigned char   mk_dflt_btn;      /∗ default button for keyboard driven
157       mouse */
158               unsigned char   num_groups;       /∗ number of keyboard groups */
159               unsigned char   groups_wrap;      /∗ how to wrap out-of-bounds groups */
160               XkbModsRec      internal;         /∗ defines server internal modifiers
161       */
162               XkbModsRec      ignore_lock;      /∗ modifiers to ignore when checking
163       for grab */
164               unsigned int    enabled_ctrls;    /∗ 1 bit => corresponding boolean
165       control enabled */
166               unsigned short  repeat_delay;     /∗ ms delay until first repeat */
167               unsigned short  repeat_interval;  /∗ ms delay between repeats */
168               unsigned short  slow_keys_delay;  /∗ ms minimum time key must be down to
169       be ok */
170               unsigned short  debounce_delay;   /∗ ms delay before key reactivated */
171               unsigned short  mk_delay;         /∗ ms delay to second mouse motion
172       event */
173               unsigned short  mk_interval;      /∗ ms delay between repeat mouse
174       events */
175               unsigned short  mk_time_to_max;   /∗ # intervals until constant mouse
176       move */
177               unsigned short  mk_max_speed;     /∗ multiplier for maximum mouse speed
178       */
179               short           mk_curve;         /∗ determines mouse move curve type */
180               unsigned short  ax_options;       /∗ 1 bit => Access X option enabled */
181               unsigned short  ax_timeout;       /∗ seconds until Access X disabled */
182               unsigned short  axt_opts_mask;    /∗ 1 bit => options to reset on Access
183       X timeout */
184               unsigned short  axt_opts_values;  /∗ 1 bit => turn option on, 0=> off */
185               unsigned int    axt_ctrls_mask;   /∗ which bits in enabled_ctrls to
186       modify */
187               unsigned int    axt_ctrls_values; /∗ values for new bits in
188       enabled_ctrls */
189               unsigned char   per_key_repeat[XkbPerKeyBitArraySize];  /∗ per key auto
190       repeat */
191            } XkbControlsRec, *XkbControlsPtr;
192
193       The XkbControlsRec structure is defined as follows:
194
195           #define XkbMaxLegalKeyCode     255
196           #define XkbPerKeyBitArraySize  ((XkbMaxLegalKeyCode+1)/8)
197
198
199           typedef struct {
200               unsigned char   mk_dflt_btn;      /∗ default button for keyboard driven
201       mouse */
202               unsigned char   num_groups;       /∗ number of keyboard groups */
203               unsigned char   groups_wrap;      /∗ how to wrap out-of-bounds groups */
204               XkbModsRec      internal;         /∗ defines server internal modifiers
205       */
206               XkbModsRec      ignore_lock;      /∗ modifiers to ignore when checking
207       for grab */
208               unsigned int    enabled_ctrls;    /∗ 1 bit => corresponding boolean
209       control enabled */
210               unsigned short  repeat_delay;     /∗ ms delay until first repeat */
211               unsigned short  repeat_interval;  /∗ ms delay between repeats */
212               unsigned short  slow_keys_delay;  /∗ ms minimum time key must be down to
213       be ok */
214               unsigned short  debounce_delay;   /∗ ms delay before key reactivated */
215               unsigned short  mk_delay;         /∗ ms delay to second mouse motion
216       event */
217               unsigned short  mk_interval;      /∗ ms delay between repeat mouse
218       events */
219               unsigned short  mk_time_to_max;   /∗ # intervals until constant mouse
220       move */
221               unsigned short  mk_max_speed;     /∗ multiplier for maximum mouse speed
222       */
223               short           mk_curve;         /∗ determines mouse move curve type */
224               unsigned short  ax_options;       /∗ 1 bit => Access X option enabled */
225               unsigned short  ax_timeout;       /∗ seconds until Access X disabled */
226               unsigned short  axt_opts_mask;    /∗ 1 bit => options to reset on Access
227       X timeout */
228               unsigned short  axt_opts_values;  /∗ 1 bit => turn option on, 0=> off */
229               unsigned int    axt_ctrls_mask;   /∗ which bits in enabled_ctrls to
230       modify */
231               unsigned int    axt_ctrls_values; /∗ values for new bits in
232       enabled_ctrls */
233               unsigned char   per_key_repeat[XkbPerKeyBitArraySize];  /∗ per key auto
234       repeat */
235            } XkbControlsRec, *XkbControlsPtr;
236

SEE ALSO

238       XkbChangeTypesOfKey(3), XkbKeyGroupInfo(3), XkbOutOfRangeGroupInfo.(3)
239
240
241
242X Version 11                     libX11 1.6.7               XkbKeyNumGroups(3)
Impressum