'keyboard state
'   检索当前的 lKeyIndex 基于状态栏例程使用此函数返回的各种键盘状态的文本字符串的指定索引。
Function FF_GetKeyState(ByVal lKeyIndex As Long) As String
   
   Select Case lKeyIndex
      Case VK_NUMLOCK
         If (GetKeyState(VK_NUMLOCK) And &H0001) = &H0001 Then Function = "NUM"
      Case VK_CAPITAL
         If (GetKeyState(VK_CAPITAL) And &H0001) = &H0001 Then Function = "CAPS"
      Case VK_SCROLL
         If (GetKeyState(VK_SCROLL) And &H0001) = &H0001 Then Function = "SCRL"
      Case VK_INSERT
         If (GetKeyState(VK_INSERT) And &H0001) = &H0001 Then Function = "INS"
   End Select
   
End Function

