XkbKeyType(3)
π XkbKeyType(3) β XKB FUNCTIONS π
okay bestie, welcome to the glow-up zone where we talk about XkbKeyType, a lil function from the XKB FUNCTIONS part of the X11 world π¦ (yes, the man page header literally says XKB FUNCTIONS, and yes we're still gonna make it cute).
β¨ NAME β¨
XkbKeyType β bestie, this one has main character energy in two whole ways: it can hand you the index of a key type or the pointer to a key type ππ
πΈ SYNOPSIS πΈ
XkbKeyTypePtr XkbKeyType (XkbDescPtr xkb, KeyCode keycode, int group);
π ARGUMENTS π
xkbβ the Xkb description you're interested in, like the whole vibe you're investigating πkeycodeβ the keycode of interest. yes, that keycode π«Άgroupβ the group index, bestie. the group. the index. iconic.
π DESCRIPTION π
so here's the tea, fr fr: XkbKeyType returns a pointer to the key type in the types vector of the client map in xkb that corresponds to the given keycode and group index β¨
like, you hand it a keycode and a group, and it's like "oh bet, here's the key type you were looking for" and gives you that pointer. no cap. π§
π¦ STRUCTURES π¦
here's the struct, and bestie I need you to read the comments, because some of them are literally warning you not to touch stuff π
typedef struct { /* Key Type */
XkbModsRec mods; /* modifiers used to compute shift level */
unsigned char num_levels; /* total # shift levels, do not modify directly */
unsigned char map_count; /* # entries in map, preserve (if non-NULL) */
XkbKTMapEntryPtr map; /* vector of modifiers for each shift level */
XkbModsPtr preserve; /* mods to preserve for corresponding map entry */
Atom name; /* name of key type */
Atom * level_names; /* array of names of each shift level */
} XkbKeyTypeRec, *XkbKeyTypePtr;
quick field rundown, because we're thorough in this house π«Ά:
modsβ the modifiers used to compute the shift level.num_levelsβ total number of shift levels. β οΈ do not modify directly, bestie, I'm serious, hands off πmap_countβ number of entries inmap. preserve it (if it's non-NULL) πmapβ vector of modifiers for each shift level.preserveβ the mods to preserve for the correspondingmapentry.nameβ name of the key type β¨level_namesβ array of names of each shift level π
and that's the whole struct: XkbKeyTypeRec, plus the pointer typedef XkbKeyTypePtr π
lowkey a whole vibe check: this isX Version 11, fromlibX11 1.8.4, and the page isXkbKeyType(3). mwah, slay, periodt π πΈ
π¦ where this page comes from
- debian bookworm: libx11-doc 2:1.8.4-2+deb12u2
- Copyright (c) 1999, Oracle and/or its affiliates
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms