- Код: Выделить всё
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Timer1_Timer()
For i = 1 To 120
If GetAsyncKeyState(i) Then n = i
Next i
Me.Caption = n & "-" & Chr(n)
End Sub
Таблица символов:
TAB - 9
Caps Look - 20
Shift - 16
Ctrl - 17
Alt - 18
Win 91
Space - 32
Enter - 13
Left - 37
Up - 38
Right - 39
Down - 40
Black Space - 8
...
Mouse Левая - 1
Mouse Правая - 2
Mouse Средняя - 4