1XkbSAActionSetCtrls(3) XKB FUNCTIONS XkbSAActionSetCtrls(3)
2
3
4
6 XkbSAActionSetCtrls - Sets the ctrls0 through ctrls3 fields of act from
7 ctrls
8
10 void XkbSAActionSetCtrls (XkbCtrlsAction act, unsigned int ctrls);
11
13 - act action in which to set ctrls0-ctrls3
14
15 - ctrls
16 value to set in ctrls0-ctrls3
17
19 Actions associated with the XkbCtrlsAction structure change the state
20 of the boolean controls.
21
22 The type field can have any one of the values shown in Table 1.
23
24
25 Table 1 Controls Action Types
26 ──────────────────────────────────────────────────────────────
27 Type Effect
28 ──────────────────────────────────────────────────────────────
29 XkbSA_SetControls A key press enables any boolean controls
30 specified in the ctrls fields that were
31 not already enabled at the time of the
32 key press. A key release disables any
33 controls enabled by the key press. This
34 action can cause XkbControlsNotify
35 events.
36 XkbSA_LockControls If the XkbSA_LockNoLock bit is not set
37 in the flags field, a key press enables
38 any controls specified in the ctrls
39 fields that were not already enabled at
40 the time of the key press.
41 If the XkbSA_LockNoUnlock bit is not set
42 in the flags field, a key release dis‐
43 ables any controls specified in the
44 ctrls fields that were not already dis‐
45 abled at the time of the key press.
46 This action can cause XkbControlsNotify
47 events.
48
49 The flags field is composed of the bitwise inclusive OR of the masks
50 shown in Table 2.
51
52
53 Table 2 Control Action Flags
54 ──────────────────────────────────────────────────────────────
55 Flag Meaning
56 ──────────────────────────────────────────────────────────────
57 XkbSA_LockNoLock If set, and the action type is
58 XkbSA_LockControls, the server only dis‐
59 ables controls.
60 XkbSA_LockNoUnlock If set, and the action type is
61 XkbSA_LockControls, the server only
62 enables controls.
63
64 The XkbSA_SetControls action implements a key that enables a boolean
65 control when pressed and disables it when released. The XkbSA_LockCon‐
66 trols action is used to implement a key that toggles the state of a
67 boolean control each time it is pressed and released. The XkbSA_Loc‐
68 kNoLock and XkbSA_LockNoUnlock flags allow modifying the toggling
69 behavior to only unlock or only lock the boolean control.
70
71 The ctrls0, ctrls1, ctrls2, and ctrls3 fields represent the boolean
72 controls in the enabled_ctrls field of the controls structure. Xkb
73 macros, to convert between the two formats.
74
75 XkbSAActionSetCtrls sets the ctrls0 through ctrls3 fields of act from
76 ctrls.
77
79 typedef struct _XkbCtrlsAction {
80 unsigned char type; /∗ XkbSA_SetControls, XkbSA_LockControls */
81 unsigned char flags; /∗ with type, controls enabling and disabling
82 of controls */
83 unsigned char ctrls3; /∗ ctrls0 through ctrls3 represent the boolean
84 controls */
85 unsigned char ctrls2; /∗ ctrls0 through ctrls3 represent the boolean
86 controls */
87 unsigned char ctrls1; /∗ ctrls0 through ctrls3 represent the boolean
88 controls */
89 unsigned char ctrls0; /∗ ctrls0 through ctrls3 represent the boolean
90 controls */
91 } XkbCtrlsAction;
92
93
94
95X Version 11 libX11 1.6.4 XkbSAActionSetCtrls(3)