the problem is its delayed about a frame or so. when i call the command it potentially gives me the value key pressed 1 key back or so when i know another had been pressed.
can we get a new command like...
getrawcurrentkey() or latest key... ?? or we need the lastkey to actually report more accuratly.
The main problem i have is in my menu system i am allowing the user to change the keyboard layout. In my main loop it waiting for a key to be pressed and then sets it for that function.
i pulled this little code chunk from my game to show what i mean.
getkey=GetRawlastkey( )
settextstring(5,"Press Key")
test=0
while test=0
newkey=getrawlastkey()
if GetRawKeyreleased(newkey)=1 and newkey<>getkey and newkey<>0 then test=1
sync()
endwhile
if test=1 then newkey=getkey
settings[11]=newkey
i know of the problem inside there if you press the same key as last time it doesnt catch it... so please dont point that out...lol its just a case of removing this(newkey<>getkey )
the problem is that when it jumps out of the loop its not always the last key pressed... it usually take 2 to 3 times for it to report the correct key i pressed.
www.sheldonscreations.com