Detect Caps Lock stateTag(s): WinAPI/Registry

[local function declaration]
FUNCTION  int GetKeyState(int keystatus) LIBRARY "user32.dll"

[powerscript]
int li_keystate

li_keystate = GetKeyState(20)

IF li_keystate = 1 THEN
    MessageBox("", "CAPS on")
ELSEIF li_keystate = 0 THEN
    MessageBox("", "CAPS off")
END IF



If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2012
[ home ]