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

NAME

6       XkbKeyActionsPtr  -   Returns a pointer to the two-dimensional array of
7       key actions associated with the key corresponding to keycode
8

SYNOPSIS

10       XkbKeyActionPtr XkbKeyActionsPtr (XkbDescPtr xkb, KeyCode keycode);
11

ARGUMENTS

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

DESCRIPTION

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

STRUCTURES

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

SEE ALSO

80       XkbKeyNumActions(3)
81
82
83
84X Version 11                     libX11 1.6.7              XkbKeyActionsPtr(3)
Impressum