XKB FUNCTIONS XkbVirtualModsToReal(3x11)
NAME
XkbVirtualModsToReal - Determines the mapping of virtual
modifiers to core X protocol modifiersSYNOPSIS
cc [ flag... ] file... -lX11 [ library... ]
Bool XkbVirtualModsToReal (XkbDescPtr xkb, unsigned int
virtual_mask, unsigned int *mask_rtrn);
ARGUMENTS- xkb
keyboard description for input device- virtual_mask
virtual modifier mask to translate- mask_rtrn
backfilled with real modifiersDESCRIPTION
Xkb maintains a virtual modifier mapping, which lists the virtual modifiers associated with, or bound to, each key. The real modifiers bound to a virtual modifier always include all of the modifiers bound to any of the keys thatspecify that virtual modifier in their virtual modifier map-
ping. The server.vmodmap array indicates which virtual modifiers are bound to each key; each entry is a bitmask for the virtual modifier bits. The server.vmodmap array is indexed by keycode. The vmodmap and vmods members of the server map are the "master" virtual modifier definitions. Xkb automatically propagates any changes to these fields to all other fields that use virtual modifier mappings.For example, if Mod3 is bound to the Num_Lock key by the
core protocol modifier mapping, and the NumLock virtualmodifier is bound to they Num_Lock key by the virtual modif-
ier mapping, Mod3 is added to the set of modifiers associ-
ated with NumLock. The virtual modifier mapping is normally updated wheneveractions are automatically applied to symbols and few appli-
cations should need to change the virtual modifier mapping explicitly. Use XkbGetMap to get the virtual modifiers from the serveror use XkbGetVirtualMods to update a local copy of the vir-
tual modifiers bindings from the server. To set the bindingof a virtual modifier to a real modifier, use XkbGetVirtual-
Mods X Version 11 Last change: libX11 1.3.5 1XKB FUNCTIONS XkbVirtualModsToReal(3x11)
If the keyboard description defined by xkb includes bindingsfor virtual modifiers, XkbVirtualModsToReal uses those bind-
ings to determine the set of real modifiers that correspondto the set of virtual modifiers specified in virtual_mask.
The virtual_mask parameter is a mask specifying the virtual
modifiers to translate; the i-th bit (0 relative) of the
mask represents the i-th virtual modifier. If mask_rtrn is
non-NULL, XkbVirtualModsToReal backfills it with the result-
ing real modifier mask. If the keyboard description in xkbdoes not include virtual modifier bindings, XkbVirtual-
ModsToReal returns False; otherwise, it returns True.RETURN VALUES
True The XkbVirtualModsToReal function returns
True if the keyboard description in xkb does include virtual modifier bindings.False The XkbVirtualModsToReal function returns
False if the keyboard description in xkb does not include virtual modifier bindings.SEE ALSO
XkbGetMap(3x11), XkbGetVirtualMods(3x11) NOTESIt is possible for a local (client-side) keyboard descrip-
tion (the xkb parameter) to not contain any virtual modifier information (simply because the client has not requested it)while the server's corresponding definition may contain vir-
tual modifier information.ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | x11/library/libx11 ||_____________________________|_____________________________|
| Interface Stability | Committed ||_____________________________|_____________________________|
| MT-Level | See XInitThreads(3X11) |
|_____________________________|_____________________________|
X Version 11 Last change: libX11 1.3.5 2