Detect if Shift Key is down
![Visual Basic 6, or VB Classic Visual Basic 6, or VB Classic](https://www.fortypoundhead.com//assets/img/icons/v7/vb6.png)
A function that returns whether or not the shift key is currently down.
Original Author: Kamilche
API Declarations
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal uAction As Long) As Long
Code
Private Function ShiftDown()
Dim RetVal As Long
RetVal = GetAsyncKeyState(16) 'SHIFT key
If (RetVal And 32768) <> 0 Then
ShiftDown = True
Else
ShiftDown = False
End If
End Function
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.