XtGetActionKeysym(3)
π XtGetActionKeysym β the XT FUNCTIONS girlies know
okay bestie, so this is a page from the XT FUNCTIONS corner of the X world, and it's literally called XtGetActionKeysym β which, iykyk, means "obtain corresponding keysym". that's the whole NAME vibe. short, sweet, iconic. π
β¨ SYNTAX β¨
#include <X11/Intrinsic.h>
KeySym XtGetActionKeysym(XEvent* event, Modifiers* modifiers_return);
like yes, that's the whole signature. she's compact. she's serving. π¦
πΈ ARGUMENTS πΈ
eventβ this is the event pointer that the Intrinsics handed to your action procedure. so, like, the pointer passed to the action procedure by the Intrinsics. that one. πmodifiers_returnβ if this isn'tNULL, she returns the modifiers that caused the match. if it isNULL, she just... doesn't. no biggie, we move. β¨
π DESCRIPTION π
okay so here's the whole tea, and you have to follow along because the conditions matter:
XtGetActionKeysym does the special thing only if all of these are true at once:
- she's called after an action procedure has been invoked by the Intrinsics,
- and before that action procedure returns,
- and the event pointer has the same value as the event pointer passed to that action routine,
- and the event is a
KeyPressorKeyReleaseevent.
if literally all of those line up? slay. then XtGetActionKeysym returns the KeySym that matched the final event specification in the translation table. and β bonus β if modifiers_return is non-NULL, she also gives you back the modifier state actually used to generate this KeySym. periodt. π
otherwise β so, if it's a KeyPress or KeyRelease event but the other conditions didn't hit β then XtGetActionKeysym calls XtTranslateKeycode and returns the results. she's outsourcing. respect. π
and if it's neither of those situations? she returns NoSymbol, and bestie, she does not examine modifiers_return. not even a lil peek. π
fr fr, keep the event pointer matching. if the pointer doesn't have the same value as the one passed to the action routine, you're not getting the translation-table answer, no matter how much you want it. π
π«Ά SEE ALSO π«Ά
X Toolkit Intrinsics - C Language InterfaceXlib - C Language X Interface
and that's the page, angel. this one shipped with X Version 11, specifically libXt 1.3.1, and the date on the tin is the libXt 1.3.1 era β so go forth, grab your keysyms, and remember: same event pointer or it's giving NoSymbol. ππ§β
π¦ where this page comes from
- alpine 3.22: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.23: libxt-doc 1.3.1-r0 Β· MIT
- alpine 3.24: libxt-doc 1.3.1-r0 Β· MIT
- arch rolling: libxt 1.3.1-1 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 43: libXt-devel 1.3.1-3.fc43 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- fedora 44: libXt-devel 1.3.1-4.fc44 Β· MIT AND HPND-sell-variant AND SMLNJ AND MIT-open-group AND X11
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- opensuse-leap 16.0: libXt-devel 1.3.1-160000.3.2 Β· MIT
- Copyright (c) 1993, 1994 X Consortium
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms