XkbFreeControls(3)

✨ NAME ✨

Okay bestie, this is XkbFreeControls(3) from the XKB FUNCTIONS manual β€” and it does exactly what it says on the tin: XkbFreeControls frees the memory used by the ctrls member of an XkbDescRec structure. Periodt. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

void XkbFreeControls (XkbDescPtr xkb, unsigned int which, Bool
       free_all);

πŸ’… ARGUMENTS πŸ’…

  • xkb β€” the Xkb description where we’re freeing controls components. That’s the main character here.
  • which β€” a mask of the components of ctrls to free. Very β€œpick your battles” energy.
  • free_all β€” True means free everything plus ctrls itself. Not me using the nuclear option, but okay! πŸ’€

πŸŽ€ DESCRIPTION πŸŽ€

XkbFreeControls frees the specified components of the ctrls field in the xkb keyboard description and sets the corresponding structure component values to NULL or zero. Lowkey tidy-up behavior, and we love that.

The which mask specifies the fields of ctrls to be freed and can contain any of the controls components specified in Table 1.

Table 1 shows the actual values for the individual mask bits used to select controls for modification and to enable and disable the control. Note that the same mask bit is used to specify general modifications to the parameters used to configure the control (which), and to enable and disable the control (enabled_ctrls). The anomalies in the table (no ok in column) are for controls that have no configurable attributes; and for controls that are not boolean controls and therefore cannot be enabled or disabled. No cap, that’s just how the bits are built. 🧚

🌈 Table 1 Controls Mask Bits 🌈

Here’s every row, bestie β€” columns are Mask Bit, which or changed_ctrls, enabled_ctrls, and Value:

  • XkbRepeatKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; Value: (1L<<0)
  • XkbSlowKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; Value: (1L<<1)
  • XkbBounceKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; Value: (1L<<2)
  • XkbStickyKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; Value: (1L<<3)
  • XkbMouseKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; Value: (1L<<4)
  • XkbMouseKeysAccelMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; Value: (1L<<5)
  • XkbAccessXKeysMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; Value: (1L<<6)
  • XkbAccessXTimeoutMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; Value: (1L<<7)
  • XkbAccessXFeedbackMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; Value: (1L<<8)
  • XkbAudibleBellMask β€” which or changed_ctrls: β€” (blank, no ok); enabled_ctrls: ok; Value: (1L<<9)
  • XkbOverlay1Mask β€” which or changed_ctrls: β€” (blank, no ok); enabled_ctrls: ok; Value: (1L<<10)
  • XkbOverlay2Mask β€” which or changed_ctrls: β€” (blank, no ok); enabled_ctrls: ok; Value: (1L<<11)
  • XkbIgnoreGroupLockMask β€” which or changed_ctrls: β€” (blank, no ok); enabled_ctrls: ok; Value: (1L<<12)
  • XkbGroupsWrapMask β€” which or changed_ctrls: ok; enabled_ctrls: β€” (blank, no ok); Value: (1L<<27)
  • XkbInternalModsMask β€” which or changed_ctrls: ok; enabled_ctrls: β€” (blank, no ok); Value: (1L<<28)
  • XkbIgnoreLockModsMask β€” which or changed_ctrls: ok; enabled_ctrls: β€” (blank, no ok); Value: (1L<<29)
  • XkbPerKeyRepeatMask β€” which or changed_ctrls: ok; enabled_ctrls: β€” (blank, no ok); Value: (1L<<30)
  • XkbControlsEnabledMask β€” which or changed_ctrls: ok; enabled_ctrls: β€” (blank, no ok); Value: (1L<<31)
  • XkbAccessXOptionsMask β€” which or changed_ctrls: ok; enabled_ctrls: ok; Value: (XkbStickyKeysMask | XkbAccessXFeedbackMask)
  • XkbAllBooleanCtrlsMask β€” which or changed_ctrls: β€” (blank, no ok); enabled_ctrls: ok; Value: (0x00001FFF)
  • XkbAllControlsMask β€” which or changed_ctrls: ok; enabled_ctrls: β€” (blank, no ok); Value: (0xF8001FFF)

If free_all is True, XkbFreeControls frees every non-NULL structure component in the controls, frees the XkbControlsRec structure referenced by the ctrls member of xkb, and sets ctrls to NULL. That’s the full send, no crumbs. πŸ”₯


And that’s the vibe check: X Version 11 β€’ libX11 1.8.14 β€’ XkbFreeControls(3) β€” no extra date on this page, so I’m not making one up, bestie πŸ«ΆπŸ’–

πŸ“¦ where this page comes from