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
21              shift level within group
22
23       - grp  group index for group of interest
24

DESCRIPTION

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

STRUCTURES

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