XkbSASetPtrDfltValue(3)
π
XkbSASetPtrDfltValue β a lil' XKB function, from the XKB FUNCTIONS corner of yer man pages π
okay so bestie, this one's a tiny setter function and honestly it's giving "small but mighty." It's called XkbSASetPtrDfltValue, and what it does is set the valueXXX field of act from val β¨
πΈ SYNOPSIS πΈ
void XkbSASetPtrDfltValue (XkbAction act, int val);
short. sweet. iconic. no cap π
π¦ ARGUMENTS π¦
actβ the action where you're gonna setvalueXXX, bestievalβ the value you're putting intovalueXXX
π DESCRIPTION π
so, the actions tied to the XkbPtrDfltAction structure? They change the mk_dflt_btn attribute of the MouseKeys control. That's the whole vibe π«Ά
but listen β if the MouseKeys control is not enabled, then KeyPress and KeyRelease events are treated as though the action is XkbSA_NoAction. Otherwise (and like, only otherwise), this action changes the mk_dflt_btn attribute of the MouseKeys control. important distinction, iykyk π
the type field of the XkbPtrDfltAction structure should always be XkbSA_SetPtrDflt. always always. no exceptions, periodt π
the flags field is composed of the bitwise inclusive OR of the values shown in Table 1 β and rn there's only one value defined, so like, adorable amount of choice lol π
β Table 1: Pointer Default Flags β
XkbSA_DfltBtnAbsoluteβ if set, thevaluefield represents an absolute pointer button. Otherwise, thevaluefield represents the amount to be added to the current default button π«
the affect field specifies what changes as a result of this action, and the only valid value for affect is XkbSA_AffectDfltBtn. that's it, that's the list π
and now the valueXXX field, the star of the show π β it's a signed character representing the new button value for the mk_dflt_btn attribute of the MouseKeys control. If XkbSA_DfltBtnAbsolute is set in flags, valueXXX specifies the button to be used. Otherwise, valueXXX specifies the amount to be added to the current default button. Either way? Illegal button choices get wrapped back around into range, so nothing goes rogue fr fr π₯
oh and also β Xkb provides macros to convert between the integer and signed character values in XkbPtrDfltAction structures. handy, right? π§
πΊ STRUCTURES πΊ
typedef struct _XkbPtrDfltAction {
unsigned char type; /* XkbSA_SetPtrDflt */
unsigned char flags; /* controls the pointer button number */
unsigned char affect; /* XkbSA_AffectDfltBtn */
char valueXXX; /* new default button member */
} XkbPtrDfltAction;
look at that little struct. four fields. immaculate. β
π quick vibe check reminder: thetypefield isXkbSA_SetPtrDfltandaffectisXkbSA_AffectDfltBtnβ those are not suggestions, bestie.
and that's the whole page!! πΈ mwah π this was X Version 11, libX11 1.8.14, and the page itself is XkbSASetPtrDfltValue(3) β go forth and set those values, queen πβ¨π
π¦ 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