I looked through some of my old vb6 code and found thid
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Function GetPressedKey() As String
For cnt = 32 To 180
'Get the keystate of a specified key
If GetAsyncKeyState(cnt) <> 0 Then
GetPressedKey = Chr$(cnt)
Exit For
End If
Next cnt
End Function
Sub Main()
KeyPressed = GetPressedKey
If KeyPressed <> "" Then
Select Case KeyPressed
Case "Q", "q"
GoTo Quit
end select
I cant get it to work in vb.net though