I am not sure if you totally understood the concept of assigning events to keys. Ok, the first thing you do is writing a function that is to be executed. Like this:
Code:
void my_key_event()
{
	printf("my_key_event was called");
}


Note that this function is not called until now. In order to assign it to a certain key you have to do the following:
Code:
on_1 = my_key_event;


That's all. There is nothing more to do. You can get rid of the key assignment by simply writing:
Code:
on_1 = NULL;


If that does not work for you there is another place in your code where on_1 gets changed as well. You can easily check this by doing the following:
Code:
on_1 = NULL;
wait(1);
if (on_1)
	printf("Oh crap! on_1 got reassigned some place else!")


Here you have a running example:
Code:
#include <acknex.h>

void foobar()
{
	beep();
}

void main()
{
	on_1 = foobar;
	wait(-10);
	on_1 = NULL;
}


In the example a key press of 1 will beep for the first ten seconds. After that the key will get disabled.



Always learn from history, to be sure you make the same mistakes again...