Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Function GetKeyState Lib "user32" (ByVal nvirtkey As Long) As Integer
'调用
If GetKeyState(45) <> 1 Then
keybd_event 45, 0, 1, 0
keybd_event 45, 0, 2, 0
End If