This code finds if any key pressed. This will be helpfull for example you're programming a screensaver. But you can not get keypresses through forms because of some components which does not support this keypress event. So you must use some API's to do this.
API DeclarationsDeclare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer