求解键盘@ ,#,左右shift十六进制码?
1.我知道2,3的十六进制码分别是,&h40和&h23,但是@ ,#十六进制码是多少?我键盘记录时显示始终是2和好.
2.左右shift键十六进制码?
Public Function LowLevelKeyboardProc(ByVal ncode As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Dim p As PKBDLLHOOKSTRUCT
Dim strKey As String
If ncode = HC_ACTION Then
Select Case wParam
Case WM_KEYDOWN
CopyMemory p, ByVal lParam, Len(p)
If p.VKCode > 0 And p.VKCode < &H92 Then
Select Case p.VKCode
Case VK_RETURN
'strKey = strKey & "{Return} "
Case &H30 To &H39, &H40 To &H5A ' 含&H40 @
strKey = strKey & Chr(p.VKCode)
Case &H23 ' 含&H23 #
strKey = strKey & Chr(p.VKCode)
Case Else
'do nothing
End Select
form.txtSS.Text = form.txtSS.Text & strKey
End If
Case Else
'do nothing
End Select
End If
CallNextHookEx WH_KEYBOARD_LL, ncode, wParam, lParam
If p.VKCode = VK_RETURN Then
strSN = Trim(form.txtSS)
form.txtSS.Text = " "
End If
End Function
[解决办法]
@是 40
#是 23
[解决办法]
是键盘扫描码~~