TERMKEY_GET_KEYNAME(3)

πŸ’– NAME πŸ’–

termkey_get_keyname β€” bestie, this one hands you a cute lil string name for a symbolic key πŸŽ€


✨ SYNOPSIS ✨

#include <termkey.h>

const char *termkey_get_keyname(TermKey *tk, TermKeySym sym);

Link with -ltermkey. 🫢


🌸 DESCRIPTION 🌸

okay so termkey_get_keyname() gives you a human-readable string name for whatever symbolic key value you pass in as sym. like, you hand it a key, it hands you back the vibe in words. iconic behavior honestly πŸ’…

here's the tea though β€” the string it returns is owned by the termkey(7) instance tk, so do NOT modify it and do NOT free it. it's not yours, bestie, it's the instance's. πŸ™ˆ

and the pointer you get back? guaranteed valid right up until the instance gets released with termkey_destroy(3). so keep tk alive and your string stays valid, no cap. ✨

also it's literally the inverse of termkey_keyname2sym(3) β€” they're giving mirror, they're giving symmetry, they're giving reverse it back. πŸ¦‹


πŸ”₯ RETURN VALUE πŸ”₯

termkey_get_key() returns a pointer to a string. that's it, that's the whole thing. pointer. string. periodt. πŸ‘‘


πŸŽ€ SEE ALSO πŸŽ€


k bye bestie, this was page TERMKEY_GET_KEYNAME(3) from the Library Functions Manual πŸ’œ go forth and name your keys, you absolute main character πŸŒˆβ­πŸ’–