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

NAME

6       XkbKeyActionEntry  -  Returns a pointer to the key action corresponding
7       to group grp and shift level lvl from the two-dimensional table of  key
8       actions associated with the key corresponding to keycode
9

SYNOPSIS

11       XkbAction  *  XkbKeyActionEntry  (XkbDescPtr  xkb, KeyCode keycode, int
12              shift, int grp);
13

ARGUMENTS

15       xkb    Xkb description of interest
16
17       keycode
18              keycode of interest
19
20       shift  shift level within group
21
22       grp    group index for group of interest
23

DESCRIPTION

25       A key action defines the effect key presses and releases  have  on  the
26       internal  state of the server. For example, the expected key action as‐
27       sociated with pressing the Shift key is  to  set  the  Shift  modifier.
28       There  is  zero  or one key action associated with each keysym bound to
29       each key.
30
31       Just as the entire list of key symbols for the keyboard mapping is held
32       in the syms field of the client map, the entire list of key actions for
33       the keyboard mapping is held in the acts array of the server  map.  The
34       total size of acts is specified by size_acts, and the number of entries
35       is specified by num_acts.
36
37       The key_acts array, indexed by keycode, describes the  actions  associ‐
38       ated  with a key. The key_acts array has min_key_code unused entries at
39       the start to allow direct indexing using a keycode. If a key_acts entry
40       is zero, it means the key does not have any actions associated with it.
41       If an entry is not zero, the entry represents an index  into  the  acts
42       field  of  the  server  map, much as the offset field of a KeySymMapRec
43       structure is an index into the syms field of the client map.
44
45       The reason the acts field is a linear list of XkbActions is  to  reduce
46       the memory consumption associated with a keymap. Because Xkb allows in‐
47       dividual keys to have multiple shift levels and a different  number  of
48       groups  per key, a single two-dimensional array of KeySyms would poten‐
49       tially be very large and sparse.  Instead, Xkb provides a small two-di‐
50       mensional array of XkbActions for each key. To store all of these indi‐
51       vidual arrays, Xkb concatenates each array together in the  acts  field
52       of the server map.
53
54       The  key  action  structures consist only of fields of type char or un‐
55       signed char.  This is done to optimize data transfer  when  the  server
56       sends  bytes  over  the wire. If the fields are anything but bytes, the
57       server has to sift through all of the  actions  and  swap  any  nonbyte
58       fields.  Because  they  consist  of nothing but bytes, it can just copy
59       them out.
60
61       XkbKeyActionEntry returns the key action corresponding to group grp and
62       shift  level  lvl from the two-dimensional table of key actions associ‐
63       ated with the key corresponding to keycode.
64

STRUCTURES

66       The KeySymMapRec structure is defined as follows:
67
68           #define XkbNumKbdGroups             4
69           #define XkbMaxKbdGroup              (XkbNumKbdGroups-1)
70
71           typedef struct {                    /* map to keysyms for a single keycode */
72               unsigned char       kt_index[XkbNumKbdGroups];  /* key type index for each group */
73               unsigned char       group_info; /* # of groups and out of range group handling */
74               unsigned char       width;      /* max # of shift levels for key */
75               unsigned short      offset;     /* index to keysym table in syms array */
76       } XkbSymMapRec, *XkbSymMapPtr;
77
78
79
80
81X Version 11                     libX11 1.8.7             XkbKeyActionEntry(3)
Impressum