XkbSAScreen(3)
π XkbSAScreen β XKB FUNCTIONS β¨
okay bestie, so this is a page from libX11's XKB functions, and it's genuinely a tiny little icon but the lore is real. Let's get into it π
πΈ NAME πΈ
XkbSAScreen β literally just hands you back the screenXXX field of act, converted to a signed int. that's the whole job. slay π
β¨ SYNOPSIS β¨
int XkbSAScreen (XkbSwitchScreenAction act);
π«Ά ARGUMENTS π«Ά
actβ the action you wanna dig the screen out of. that's it, that's the arg π
π¦ DESCRIPTION π¦
so, actions tied to the XkbSwitchScreen action structure are the ones that change the active screen on a multiscreen display. main character energy fr π₯οΈβ¨
the type field of the XkbSwitchScreenAction structure should always be XkbSA_SwitchScreen. no cap, always.
the flags field is composed of the bitwise inclusive OR of the masks in Table 1 down below π
π Table 1 β Switch Screen Action Flags π
XkbSA_SwitchAbsoluteβ if it's set, thescreenXXXfield represents the index of the new screen. if it's not set, it represents an offset from the current screen to the new screen. iykyk π«XkbSA_SwitchApplicationβ if it's not set, the action should switch to another screen on the same server. if it is set, it should switch to another X server or application that shares the same physical display. iconic behaviour tbh π
the screenXXX field is a signed character value that represents either the relative or the absolute screen index β depends on the state of the XkbSA_SwitchAbsolute bit in the flags field. Xkb provides the following macros to convert between the integer and signed character value for screen numbers in XkbSwitchScreenAction structures. so convenient bestie π§
the XkbSAScreen macro returns the screenXXX field of act converted to a signed int. periodt. β
π STRUCTURES π
typedef struct _XkbSwitchScreenAction {
unsigned char type; /* XkbSA_SwitchScreen */
unsigned char flags; /* controls screen switching */
char screenXXX; /* screen number or delta */
} XkbSwitchScreenAction;
look at that little guy. three fields. living his best life. π
π NOTES π
theXkbSwitchScreenaction is optional. servers are free to ignore the action or any of its flags if they don't support the requested behavior. if the action is ignored, it behaves likeXkbSA_NoAction. otherwise, key press and key release events do not generate an event. π so yeah, don't count on it always doing the thing β it's giving "i'll do it if i feel like it" energy π
and that's the whole page bestie, short & sweet πΈ β brought to you by X Version 11, libX11 1.8.14, dated the way manpages do, with the page living under the name XkbSAScreen(3). mwah ππ«Άπ
π¦ 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