This example gets the current state of the Caps Lock key and prints the state to the debug output window.
var CurrCapsState = GetKeyState( "C" );if (CurrCapsState) Debug.trace( "Caps Lock is ON\n" );else Debug.trace( "Caps Lock is OFF\n" );