XkbSetXlibControls(3)
β¨ XkbSetXlibControls β the XKB functions era β¨
okay so bestie, quick vibe check: this is a page from the XKB FUNCTIONS section of the manual (yes, the whole section, it's giving very library-core π
), and it's about XkbSetXlibControls. Buckle up, it's short but it eats. π
π¦ NAME π¦
XkbSetXlibControls β literally changes the state of the Library Controls. that's it, that's the whole job. no cap.
πΈ SYNOPSIS πΈ
unsigned int XkbSetXlibControls (Display *display, unsigned long
bits_to_change, unsigned long values_for_bits);
like, it returns an unsigned int and takes three things. iconic signature honestly.
π ARGUMENTS π
displayβ the connection to the X server. your whole link to the mothership basically. πΈbits_to_changeβ this one selects which controls get modified. it's the "who's getting the makeover" list.values_for_bitsβ turns the selected controls on (1) or off (0). the on/off switch energy. π₯
π DESCRIPTION π
so XkbSetXlibControls modifies the state of the controls selected by bits_to_change. key detail: only the controls selected by bits_to_change are modified β everyone else stays exactly where they were, minding their own business. π«Ά
the rules, fr fr:
- if the bit corresponding to a control is on in
bits_to_changeAND also on invalues_for_bitsβ the control is enabled. slay. β¨ - if the bit corresponding to a control is on in
bits_to_changebut off invalues_for_bitsβ the control is disabled. π
and bits_to_change should be an inclusive OR of bits from Table 1, which is right here:
π Table 1 Library Control Masks π
Library Control Mask Value
βββββββββββββββββββββββββββββββββββββββββββββββ
XkbLC_ForceLatin1Lookup (1 << 0)
XkbLC_ConsumeLookupMods (1 << 1)
XkbLC_AlwaysConsumeShiftAndLock (1 << 2)
XkbLC_IgnoreNewKeyboards (1 << 3)
XkbLC_ConsumeKeysOnComposeFail (1 << 29)
XkbLC_ComposeLED (1 << 30)
XkbLC_BeepOnComposeFail (1 << 31)
XkbLC_AllControls (0xc0000007)
not the bits being all dramatic with jumps from 3 straight to 29 π but okay, we respect the design choices.
π RETURN VALUES π
yes bestie, the return values are literally just the masks again β here's the full rundown so nothing gets lost:
(1 << 0)βXkbLC_ForceLatin1Lookup(1 << 1)βXkbLC_ConsumeLookupMods(1 << 2)βXkbLC_AlwaysConsumeShiftAndLock(1 << 3)βXkbLC_IgnoreNewKeyboards(1 << 29)βXkbLC_ConsumeKeysOnComposeFail(1 << 30)βXkbLC_ComposeLED(1 << 31)βXkbLC_BeepOnComposeFail(0xc0000007)βXkbLC_AllControls
reminder: keep bits_to_change as an inclusive OR of those Table 1 bits, and remember only the selected controls move. everything else stays untouched. that's the whole personality of this function. π
and that's the page!! π sourced from X Version 11, libX11 1.8.14, dated with XkbSetXlibControls(3) at the bottom β mwah, bye bestie, go set some controls ππ§
π¦ where this page comes from
- alpine 3.24: libx11-doc 1.8.14-r0 Β· X11
- arch rolling: libx11 1.8.14-1 Β· MIT AND X11
- nixos 26.05: libx11 1.8.14
- nixpkgs unstable: libx11 1.8.14
- Copyright (c) 1999, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms