XkbSAActionSetCtrls(3)
β¨ NAME β¨
XkbSAActionSetCtrls β bestie, this one sets the ctrls0 through ctrls3 fields of act from ctrls. That's it, that's the job π
(oh also hi, you're reading the XKB FUNCTIONS corner of the libX11 manual, section 3, iykyk π)
πΈ SYNOPSIS πΈ
void XkbSAActionSetCtrls (XkbCtrlsAction act, unsigned int ctrls);
π¦ ARGUMENTS π¦
actβ the action where we're gonna setctrls0-ctrls3π«Άctrlsβ the value that goes intoctrls0-ctrls3β¨
π DESCRIPTION π
So, actions that hang out with the XkbCtrlsAction structure? They change the state of the boolean controls. That's their whole thing, no cap.
The type field can be any one of the values in Table 1 π
π Table 1: Controls Action Types
XkbSA_SetControlsβ a key press enables any boolean controls named in thectrlsfields that weren't already enabled when the key got pressed. A key release disables any controls that the key press enabled. This action can causeXkbControlsNotifyevents. Not me causing events fr πXkbSA_LockControlsβ if theXkbSA_LockNoLockbit is not set in theflagsfield, a key press enables any controls named in thectrlsfields that weren't already enabled at the time of the key press. If theXkbSA_LockNoUnlockbit is not set in theflagsfield, a key release disables any controls named in thectrlsfields that weren't already disabled at the time of the key press. This action can causeXkbControlsNotifyevents too. Two event causers, we love to see it π
The flags field is literally the bitwise inclusive OR of the masks in Table 2 π§
π§ Table 2: Control Action Flags
XkbSA_LockNoLockβ if set, and the action type isXkbSA_LockControls, the server only disables controls. Locked out of locking, iconic honestly πXkbSA_LockNoUnlockβ if set, and the action type isXkbSA_LockControls, the server only enables controls.
The XkbSA_SetControls action implements a key that enables a boolean control when it's pressed and disables it when it's released. The XkbSA_LockControls action is what you use to implement a key that toggles the state of a boolean control every single time it's pressed and released. And the XkbSA_LockNoLock and XkbSA_LockNoUnlock flags let you modify that toggling behavior so it only unlocks, or only locks, the boolean control. Main character energy for real π
The ctrls0, ctrls1, ctrls2, and ctrls3 fields represent the boolean controls in the enabled_ctrls field of the controls structure. Xkb macros, to convert between the two formats.
XkbSAActionSetCtrls sets the ctrls0 through ctrls3 fields of act from ctrls. Slay, that's the function π
π STRUCTURES π
typedef struct _XkbCtrlsAction {
unsigned char type; /* XkbSA_SetControls, XkbSA_LockControls */
unsigned char flags; /* with type, controls enabling and disabling of controls */
unsigned char ctrls3; /* ctrls0 through ctrls3 represent the boolean controls */
unsigned char ctrls2; /* ctrls0 through ctrls3 represent the boolean controls */
unsigned char ctrls1; /* ctrls0 through ctrls3 represent the boolean controls */
unsigned char ctrls0; /* ctrls0 through ctrls3 represent the boolean controls */
} XkbCtrlsAction;
okay that's the whole page bestie π«Ά this was X Version 11, libX11 1.8.4, and the page itself is XkbSAActionSetCtrls(3) β go forth and set those ctrls fields, you absolute icon π β¨π
π¦ where this page comes from
- debian bookworm: libx11-doc 2:1.8.4-2+deb12u2
- Copyright (c) 1999, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms