Macaw OS C reference

Function btnp

#include <macaw.h>
int btnp(const char *key);

Tells you whether a key was pressed this frame. It's true again every so often while the key is held, the way typing repeats, so use it for menus and jumps.

Parameters

keyconst char *
The key's name, as for btn.

Returns int

1 in the frame the key goes down or repeats, or 0.

In The keyboard and mouse, with btn, mouse, textinput, keysp, keyspname.