Search Tools Links Login

Detect if Shift Key is down

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


Private Function ShiftDown()
  Dim RetVal As Long
  RetVal = GetAsyncKeyState(16) 'SHIFT key
  If (RetVal And 32768) <> 0 Then
    ShiftDown = True
    ShiftDown = False
  End If
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 93 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.