XkbSetIndicatorMap(3)
π XkbSetIndicatorMap(3) β the XKB FUNCTIONS bestie β¨
πΈ NAME πΈ
XkbSetIndicatorMap β lowkey downloads the changes to the server based on modifications to a local copy of the keyboard description, and that update will update the maps for one or more indicators. periodt. π
β¨ SYNOPSIS β¨
the signature is literally:
Bool XkbSetIndicatorMap (Display *dpy, unsigned int which, XkbDescPtr
desc);
π ARGUMENTS π
okay so the arguments are giving:
dpyβ connection to the X server.whichβ mask of indicators to change.descβ keyboard description from which the maps are taken.
π DESCRIPTION π
This section is all about what happens when you explicitly change indicators, depending on different settings in the indicator map. See Table 1 and Table 2 for the info on the effects of the indicator map fields when explicit changes are made. iykyk π
π Table 1: XkbIndicatorMapRec which_groups and groups, Indicator Drives Keyboard
Columns: which_groups Β· New State Β· Effect on Keyboard Group State
which_groups:XkbIM_UseNoneβ New State: On or Off. Effect: no effect.which_groups:XkbIM_UseBaseβ New State: On or Off. Effect: no effect.which_groups:XkbIM_UseLatchedβ New State: On. Effect: thegroupsfield is treated as a group mask. The keyboard group latch is changed to the lowest numbered group specified ingroups; ifgroupsis empty, the keyboard group latch is changed to zero.which_groups:XkbIM_UseLatchedβ New State: Off. Effect: thegroupsfield is treated as a group mask. If the indicator is explicitly extinguished, keyboard group latch is changed to the lowest numbered group not specified ingroups; ifgroupsis zero, the keyboard group latch is set to the index of the highest legal keyboard group.which_groups:XkbIM_UseLockedorXkbIM_UseEffectiveβ New State: On. Effect: if thegroupsmask is empty, group is not changed; otherwise, the locked keyboard group is changed to the lowest numbered group specified ingroups.which_groups:XkbIM_UseLockedorXkbIM_UseEffectiveβ New State: Off. Effect: the locked keyboard group is changed to the lowest numbered group that is not specified in thegroupsmask, or toGroup1if thegroupsmask contains all keyboard groups.
π¦ Table 2: XkbIndicatorMapRec which_mods and mods, Indicator Drives Keyboard
Columns: which_mods Β· New State Β· Effect on Keyboard Modifiers
which_mods:XkbIM_UseNoneorXkbIM_UseBaseβ New State: On or Off. Effect: No Effect.which_mods:XkbIM_UseLatchedβ New State: On. Effect: any modifiers specified in themaskfield ofmodsare added to the latched modifiers.which_mods:XkbIM_UseLatchedβ New State: Off. Effect: any modifiers specified in themaskfield ofmodsare removed from the latched modifiers.which_mods:XkbIM_UseLocked,XkbIM_UseCompat, orXkbIM_UseEffectiveβ New State: On. Effect: any modifiers specified in themaskfield ofmodsare added to the locked modifiers.which_mods:XkbIM_UseLockedβ New State: Off. Effect: any modifiers specified in themaskfield ofmodsare removed from the locked modifiers.which_mods:XkbIM_UseCompatorXkbIM_UseEffectiveβ New State: Off. Effect: any modifiers specified in themaskfield ofmodsare removed from both the locked and latched modifiers.
okay so hereβs the big one: if XkbIM_LEDDrivesKB is set and XkbIM_NoExplicit is not set, and you call a function that updates the serverβs image of the indicator map (like XkbSetIndicatorMap or XkbSetNamedIndicator), Xkb changes the keyboard state and controls to reflect the other fields of the indicator map. If you try to explicitly change the value of an indicator where XkbIM_LEDDrivesKB is absent or where XkbIM_NoExplicit is present, keyboard state or controls are unaffected. π
If neither XkbIM_NoAutomatic nor XkbIM_NoExplicit is set in an indicator map, Xkb honors any request to change the state of the indicator, but that new state might be immediately superseded by automatic changes to the indicator state if the keyboard state or controls change.
Changing an indicator that drives the keyboard is cumulative β highkey a single change can affect keyboard group, modifiers, and controls at the same time. π
If you change an indicator where both XkbIM_LEDDrivesKB and XkbIM_NoAutomatic are specified, Xkb applies the keyboard changes specified in the other indicator map fields and changes the indicator to reflect the state you explicitly requested. The indicator stays in that new state until you explicitly change it again.
If XkbIM_NoAutomatic is not set and XkbIM_LEDDrivesKB is set, Xkb applies the changes specified in the other indicator map fields and sets the state of the indicator to the values specified by the indicator map. Heads up: in this case the indicator can end up in a different state than the one that was explicitly requested. For example, Xkb does not extinguish an indicator with which_mods of XkbIM_UseBase and mods of Shift if, at the time Xkb processes the request to extinguish the indicator, one of the Shift keys is physically depressed. π
If you explicitly light an indicator for which XkbIM_LEDDrivesKB is set, Xkb enables all of the boolean controls specified in the ctrls field of its indicator map. Explicitly extinguishing such an indicator causes Xkb to disable all of the boolean controls specified in ctrls.
For each bit set in the which parameter, XkbSetIndicatorMap sends the corresponding indicator map from the desc parameter to the server.
π¦ SEE ALSO π¦
and thatβs the page, bestie π β signed with X Version 11, libX11 1.8.14, and XkbSetIndicatorMap(3) π β¨π«Ά
π¦ 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