adime_scanc..._short_name(3)

πŸ“¦ version 2.2.1, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

adime_scancode_to_short_name β€” the lil bestie that turns a keyboard scancode into its short lil name ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <adime.h>

char *adime_scancode_to_short_name(int scancode, char *buf)

🌸 DESCRIPTION 🌸

okay so. you have a scancode, right? like, the raw number a keyboard sends when you press a key πŸ‘€ and you want the name of that key but make it short. that's literally this function, no cap.

it converts a keyboard scancode into a string πŸ¦‹ and here's the cute part β€” the string it gives you is exactly the text that comes after KEY_Β΄ in the macro name for that key. so if you feed it KEY_DELETE, it hands you back "DELETE"`. it's giving "just the vibe, none of the prefix" πŸ’…

and what does it return? bestie it returns the buffer 🫢 OR β€” if the scancode didn't match any known key β€” it returns NULL. so yeah, always vibe check your return value, okay? 😭


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page bestie πŸŽ€ this one lives in the Adime API Reference, it's the adime_scanc..._short_name(3) page, and it's brought to you by Adime, version 2.2.1 β€” stan πŸ’– periodt πŸ‘‘

πŸ“¦ where this page comes from