IsCursorKey(3)

✨ IsCursorKey(3) ✨

okay so this is one of those XLIB FUNCTIONS pages, bestie β€” it's the official keysym classification macro lore and honestly it's giving "tiny functions, big main character energy" πŸ’…


πŸŽ€ NAME πŸŽ€

IsCursorKey, IsFunctionKey, IsKeypadKey, IsMiscFunctionKey, IsModifierKey, IsPFKey, IsPrivateKeypadKey β€” the keysym classification macros, aka the friend group that looks at a KeySym and is like "hmm what are you tho" πŸ•΅οΈβ€β™€οΈ


🌸 SYNTAX 🌸

int IsCursorKey(KeySym keysym);

int IsFunctionKey(KeySym keysym);

int IsKeypadKey(KeySym keysym);

int IsMiscFunctionKey(KeySym keysym);

int IsModifierKey(KeySym keysym);

int IsPFKey(KeySym keysym);

int IsPrivateKeypadKey(KeySym keysym);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • keysym β€” bestie, this is literally the KeySym that is to be tested. that's the whole assignment. hand it over and let the macro do its little vibe check ✨

πŸ’– DESCRIPTION πŸ’–

okay so each of these macros is a tiny "are you…?" detector, and they all lowkey do the same shape of thing: you give them a KeySym, they hit you back with True if that keysym matches their whole thing, and honestly they're all eating πŸ”₯

  • IsCursorKey returns True if the specified KeySym is a cursor key. arrow-key behavior, no cap πŸ‘‘
  • IsFunctionKey returns True if the KeySym is a function key. yes the F-keys, they have a fanbase πŸŽ€
  • IsKeypadKey returns True if the specified KeySym is a keypad key. numpad girlies rise 🌸
  • IsMiscFunctionKey returns True if the specified KeySym is a miscellaneous function key. the misc ones are so iconically unbothered πŸ’…
  • IsModifierKey returns True if the specified KeySym is a modifier key. the ones that change what everything else means, main character energy fr fr ⭐
  • IsPFKey returns True if the specified KeySym is a PF key. PF keys stay having their own little moment πŸ¦‹
  • IsPrivateKeypadKey returns True if the specified KeySym is a vendor-private keypad key. vendor-private, so like, it's got its own thing going on πŸ™ˆ
ngl all seven return int, and the answer you care about is True β€” that's the whole vibe check 🌈

🫢 SEE ALSO 🫢


and that's the page bestie!! shoutout to X Version 11, libX11 1.8.14, and this little IsCursorKey(3) moment β€” go classify some keysyms, you're gonna slay πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from