Set/Unset Toggle keys
Toggle Num Lock, Caps Lock and Scroll Lock under Windows 95/98/NT/2000
Original Author: Keith M Jacobs
Assumptions
Refer to MSKB Q177674
API Declarations
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128 ' Maintenance string for PSS usage
End Type
' API declarations:
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Long
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long
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 GetKeyboardState Lib "user32" (pbKeyState As Byte) As Long
Private Declare Function SetKeyboardState Lib "user32" (lppbKeyState As Byte) As Long
' Constant declarations:
Private Const KEYEVENTF_EXTENDEDKEY = &H1
Private Const KEYEVENTF_KEYUP = &H2
Private Const VER_PLATFORM_WIN32_NT = 2
Private Const VER_PLATFORM_WIN32_WINDOWS = 1
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 107 times
Categories
Attachments
CODE_UPLOAD89438142000.zip
Posted: 9/3/2020 3:45:00 PM
Size: 2,448 bytes
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.