There really aren't any more Windows functions for the keyboard, unless you go to use DirectInput, which I always found to be flakey.
The reason is that GetAsyncKeyState isn't what anyone uses for keyboard input in real applications. In Windows you would sit and wait for WM_KEYUP and WM_KEYDOWN messages in your Windows proc.
How I deal with it then is:
For each WM_KEYDOWN, set a value in an array for, ie. keys[pressed_key]=1
For each WM_KEYUP, clear a value in the array for, ie. keys[pressed_key]=0
Then when I want to know about keys I look in the array.
Of course, you can't do this with GetAsyncKeyState because it only reads one key at a time...
You want a key that won't repeat, right?
X_currently_pressed = false;
X_was_pressed = false;
...
Sub ReadKeyboard()
if GetAsyncKeyState('X') & -32768 then
if X_currently_pressed == true then
X_was_pressed = false
else
X_was_pressed = true
end if
X_currently_pressed = true;
else
X_currently_pressed = false;
X_was_pressed = false;
end if
End Sub
Now you call ReadKeyboard very regularly (each frame). If you want to know about X, then look at X_was_pressed to see if the key has gone down since the last time, and X_currently_pressed to see if it is down now.
Jim