XMTRANSLATEKEY(3)

πŸ“¦
version 2.5.2 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

XmTranslateKey β€” the default keycode-to-keysym translator, bestie. that's literally her whole job πŸ’…


✨ SYNOPSIS ✨

#include <Xm/Xm.h>
void XmTranslateKey(
Display *display,
KeyCode keycode,
Modifiers modifiers,
Modifiers *modifiers_return,
KeySym *keysym_return);

πŸ’– DESCRIPTION πŸ’–

okay so. XmTranslateKey is THE default XtKeyProc translation procedure for Motif applications β€” like, the blueprint one, the og, the main character. she takes a keycode plus some modifiers and hands you back the keysym that goes with them. no cap, that's it, that's the vibe check. ✨

she's got two main purposes and both of them are iconic:

  1. letting brand-new translators with expanded functionality get the default Motif keycode-to-keysym translation on top of whatever extra stuff they add πŸ¦‹
  2. reinstalling the default translator, periodt πŸ‘‘

the way this works is: this function is what makes keysyms defined by the Motif virtual bindings usable when an application needs its own XtKeyProc installed. so you're not losing the default behavior, you're just… layering. obsessed. πŸ’œ

now the parameters, one by one, because we don't skip a single one in this house:

  • display β€” specifies the display that the keycode is from 🌈
  • keycode β€” specifies the keycode to translate πŸ”₯
  • modifiers β€” specifies the modifier keys to be applied to the keycode πŸŽ€
  • modifiers_return β€” specifies a mask of the modifier keys actually used to generate the keysym. and yes, bestie, that's an AND of modifiers and any default modifiers applied by the currently registered translator 🫢
  • keysym_return β€” specifies a pointer to the resulting keysym πŸ’«


and that's the whole page, mwah πŸ’– this one came straight outta the XmTranslateKey(library call) manual, so if you see that footer floating around somewhere, that's her, that's the source, that's the version-and-date energy, bye bestie πŸŽ€βœ¨