I'm having trouble to get access to reliable key presses of the keyboard (up and down keys in my case). Method that I'm using right now is to run application modul with "--LogKeyboard=1" and to read out the values of the "KeyDown" state at the beggining of my implementation of the ApplicationBase::Process function. Problem is that not all of the key-presses are received, so I need to press the key a bunch of times until it's received by the framework.
Is there a better way to do this?
Access to keyboard key presses
-
mellinger
- Posts: 1341
- Joined: 12 Feb 2003, 11:06
When you just read the value of the "KeyDown" state this way:
you will not catch all keypresses. Rather, you need to consider the state's value for each sample in the block:
HTH,
Juergen
Code: Select all
int keyDown = State( "KeyDown" );
Code: Select all
int sampleBlockSize = Parameter( "SampleBlockSize" );
for( int i = 0; i < sampleBlockSize; ++i )
{
int keyDown = State( "KeyDown" )( i );
...
}
Juergen
Who is online
Users browsing this forum: No registered users and 0 guests
