Hi,
I would use acknex log file.

Code:
#include <acknex.h>

STRING *strDiag = "#128";

void keyLog ( var _key )
{
	str_cpy ( strDiag, "" );
	str_cat_num ( strDiag, "\n%06.0f", total_ticks );
	str_cat_num ( strDiag, " (%03.0f) ", _key );
	STRING *_strKey = str_for_key ( NULL, _key );
	if ( _strKey )
	{
		str_cat ( strDiag, _strKey );
		str_cat ( strDiag, " " );
	}
	str_cat ( strDiag, "hit" );
	diag ( strDiag->chars );
	
	var _timer = total_ticks;
	while ( key_pressed ( _key ) )
		wait(1);
	var _secs = ( total_ticks - _timer ) / 16;
	
	str_cpy ( strDiag, "" );
	str_cat_num ( strDiag, "\n%06.0f", total_ticks );
	str_cat_num ( strDiag, " (%03.0f) ", _key );
	_strKey = str_for_key ( NULL, _key );
	if ( _strKey )
	{
		str_cat ( strDiag, _strKey );
		str_cat ( strDiag, " " );
	}
	str_cat_num ( strDiag, "released, %.3f seconds held", _secs );
	diag ( strDiag->chars );
}

void main ()
{
	var lastOld = key_lastpressed;
	while ( 1 )
	{
		if ( lastOld != key_lastpressed )
		{
			keyLog ( key_lastpressed );
			lastOld = key_lastpressed;
		}
		wait(1);
	}
}



Salud!