XkbResizeKeyType(3)
πΈ NAME πΈ
Okay so this is the XkbResizeKeyType(3) page from the XKB FUNCTIONS manual, and it's literally about changing the number of levels in a key type. Periodt. π
β¨ SYNOPSIS β¨
Status XkbResizeKeyType (XkbDescPtr xkb, int type_ndx, int map_count,
Bool want_preserve, int new_num_lvls);
π ARGUMENTS π
xkbβ keyboard description containing client map to updatetype_ndxβ index inxkb->map->typesof type to changemap_countβ total # of map entries needed for the typewant_preserveβTrue=> list of preserved modifiers is necessarynew_num_lvlsβ new max # of levels for type
π DESCRIPTION π
Okay so XkbResizeKeyType changes the type specified by xkb->map->types[type_ndx], and reallocates the symbols and actions bound to all keys that use the type, if necessary. It's giving "resize the whole vibe" but only for that type. π
XkbResizeKeyType updates only the local copy of the types in xkb; to update the server's copy for the physical device, use XkbSetMap or XkbChangeMap after calling XkbResizeKeyType.
π Vibe check: local only, bestie. The server does not get the update until you do theXkbSetMap/XkbChangeMapstep.
The map_count parameter specifies the total number of map entries needed for the type, and can be zero or greater. If map_count is zero, XkbResizeKeyType frees the existing map and preserve entries for the type if they exist and sets them to NULL.
The want_preserve parameter specifies whether a preserve list for the key should be created. If want_preserve is True, the preserve list with map_count entries is allocated or reallocated if it already exists. Otherwise, if want_preserve is False, the preserve field is freed if necessary and set to NULL.
The new_num_lvls parameter specifies the new maximum number of shift levels for the type and is used to calculate and resize the symbols and actions bound to all keys that use the type.
If type_ndx does not specify a legal type, new_num_lvls is less than 1, or the map_count is less than zero, XkbResizeKeyType returns BadValue. If XkbResizeKeyType encounters any problems with allocation, it returns BadAlloc. Otherwise, it returns Success.
π«Ά RETURN VALUES π«Ά
Successβ TheXkbResizeKeyTypefunction returnsSuccessiftype_ndxspecifies a legal type,new_num_lvlsis greater than zero andmap_countis positive.
π¨ DIAGNOSTICS π¨
BadAllocβ Unable to allocate storageBadValueβ An argument is out of range
π SEE ALSO π
β X Version 11 β¨ libX11 1.8.14 β¨ date: not printed on this page β mwah, bestie! π
π¦ 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