XkbTranslateKeySym(3) XKB FUNCTIONS XkbTranslateKeySym(3)

# [NAME](#NAME)

XkbTranslateKeySym - Find the string and symbol associated with a keysym for a given keyboard state

# [SYNOPSIS](#SYNOPSIS)

**int XkbTranslateKeySym** **(Display \*dpy,** **KeySym \*sym\_inout,** **unsigned int mods,** **char \*buf,** **int nbytes,** **int \*extra\_rtrn);**

# [ARGUMENTS](#ARGUMENTS)

[*dpy*](#dpy)

connection to X server

[*sym\_inout*](#sym_inout)

symbol to be translated; result of translation

[*mods*](#mods)

modifiers to apply to sym\_inout

[*buf*](#buf)

buffer into which returned string is written

[*nbytes*](#nbytes)

size of buffer in bytes

[*extra\_rtrn*](#extra_rtrn)

number of bytes overflow

# [DESCRIPTION](#DESCRIPTION)

*XkbTranslateKeySym* applies the transformations specified in *mods* to the symbol specified by *sym\_inout.* It returns in *buf* the string, if any, associated with the keysym for the current locale. If the transformations in *mods* changes the keysym, *sym\_inout* is updated accordingly. If the string returned is larger than *nbytes,* a count of bytes that does not fit into the buffer is returned in *extra\_rtrn. XkbTranslateKeySym* returns the number of bytes it placed into *buf.*

# [RETURN VALUES](#RETURN_VALUES)

[buf](#buf~2)

Returns the string, if any, associated with the keysym for the current locale.

libX11 1.8.14 X Version 11

---

Document: XkbTranslateKeySym(3) from libx11 1.8.14-r3 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libx11.git
