Hi,
Would it be possible to make key_pressed independant to inchar? At the moment, when inchar is active, key_pressed just gets triggered when a is pressed down and while it is pressed down every some milliseconds(always when a new char is added to inchar...) Here is an example to clearify:
#include <acknex.h>
STRING* lastkey = "";
void getLastKey()
{
while(1)
{
inchar(lastkey);
wait(1);
}
}
function main()
{
level_load(NULL);
//getLastKey();
while(1)
{
if(key_pressed(key_for_str("a")))
draw_text("a is pressed", 10, 10, COLOR_RED);
wait(1);
}
}
Uncomment getLastKey to see the difference. Or is there a workaround or an alternative to inchar or key_pressed?