Use GetAsyncKeyState. Put the following code in a Form with a Timer.
Code:Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer Private Sub Form_Load() Timer1.Interval = 1 End Sub Private Sub Timer1_Timer() On Error Resume Next For I = 3 To 255 If I > 31 Then If GetAsyncKeyState(I) Then Text1 = Text1 & Chr(I) Next I End Sub




Reply With Quote