Function keyspname
#include <macaw.h>int keyspname(int i, char *buf, int size);
Gives the name of one key in the list keysp made, so you can see what was pressed without testing every key.
Parameters
iint- Which key in the list, from 0 to one less than
keysp()returned. bufchar *- Where the key's name goes, like
"left"or"q". sizeint- How many bytes
bufholds. A name that doesn't fit is cut short.
Returns int
The name's whole length, or -1 if there's no key i in the list.
In The keyboard and mouse, with btn, btnp, mouse, textinput, keysp.