XkbSetAutoResetControls(3)
π XkbSetAutoResetControls(3) β like, the XKB FUNCTIONS era π
okay so bestie, welcome to the XKB FUNCTIONS corner of the universe β¨ this one's a libX11 classic and honestly it's giving "tiny function, big feelings" energy. shall we? π¦
πΈ NAME πΈ
XkbSetAutoResetControls β it changes the current values of the AutoReset control attributes. that's it. that's the whole vibe check π
β¨ SYNOPSIS β¨
Bool XkbSetAutoResetControls (Display *dpy, unsigned int changes,
unsigned int *auto_ctrls, unsigned int *auto_values);
like, it returns a Bool, so you do get to know if it slayed or flopped π«Ά
π ARGUMENTS π
dpyβ your connection to the X server. the main character, lowkey πchangesβ the controls you want to change auto-reset values for. this is your who's getting the makeover list πauto_ctrlsβ the controls fromchangesthat should auto reset. so like, the shortlist π¦auto_valuesβ1bit => auto-reset on. simple as that, no cap β
π₯ DESCRIPTION π₯
so XkbSetAutoResetControls changes the auto-reset status and the associated auto-reset values for the controls selected by changes. fr fr, that's the whole plot π
here's the tea β for any control selected by changes:
- if the corresponding bit is set in
auto_ctrls, that control is configured to auto-reset when the client exits π - and if the corresponding bit in
auto_valuesis on, the control is turned on when the client exits π - if that bit is zero, the control is turned off when the client exits π
meanwhile, for any control selected by changes where the corresponding bit is not set in auto_ctrls? that control is configured to not reset when the client exits. periodt. β¨
π the examples, because obviously π
for example:
to leave the auto-reset controls for StickyKeys the way they are:
ok = XkbSetAutoResetControls(dpy, 0, 0, 0);
to change the auto-reset controls so that StickyKeys are unaffected when the client exits:
ok = XkbSetAutoResetControls(dpy, XkbStickyKeysMask, 0, 0);
to change the auto-reset controls so that StickyKeys are turned off when the client exits:
ok = XkbSetAutoResetControls(dpy, XkbStickyKeysMask, XkbStickyKeysMask, 0);
to change the auto-reset controls so that StickyKeys are turned on when the client exits:
ok = XkbSetAutoResetControls(dpy, XkbStickyKeysMask, XkbStickyKeysMask,
XkbStickyKeysMask);
the way that last one just stacks XkbStickyKeysMask three timesβ¦ iconic honestly π
π§ the backfill moment (don't skip this) π§
XkbSetAutoResetControls backfills auto_ctrls and auto_values with the auto-reset controls for this particular client π«
β οΈ and here's the important bit, bestie: all of the bits are valid in the returned values β not just the ones selected in the changes mask. like, the whole palette comes back, not just the shades you asked about π
π ok that's the page π
written up all cute from the X Version 11 release of libX11 1.8.14, and that's the XkbSetAutoResetControls(3) manual page β mwah, go forth and auto-reset responsibly π«Άππ
π¦ 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