Page 1 of 1

What about a better keyboardinkey()?

Posted: Thu Aug 18, 2005 8:21 pm
by Poshu
Hello ^^
I need a way to let user write in an openscreen(), that's why I tried keyboardinkey().
But I don't like the way it works (the chr appears after you release the key) that's why I am looking for a better function.
Does someone can help me for this?

Posted: Thu Aug 18, 2005 11:08 pm
by dracflamloc
Yea it's pretty shoddy and has many bugs which I've reported before...

Posted: Sat Sep 24, 2005 9:42 pm
by oakvalley
I use GetAsyncKeyState_() all the time. It's API stuff, and Windows take
care of the inputs. In a loop it will detect when you a press a key DOWN,
and not when you release it..

Quick code like:

Repeat
If GetAsyncKeyState_($53) & $1
; You pressed S key
End
EndIf
Delay(1)
ForEver

Use these HEX values from this MSDN table:

http://msdn.microsoft.com/library/defau ... yCodes.asp