|
View the Klocks main help screen:-
klocks /?
Display the current Lock keys status:-
klocks
Typical output from the above command showing that only the Num lock
is on:-
Num:1 Caps:0 Scroll:0
Turn on the Num lock:-
klocks +n
Toggles Num and Caps lock.:-
klocks !num !caps
Turns on Scroll lock and turns off Num and Caps lock:-
klocks +scroll -num -c
Batch file to continuously flash all Lock indicator lights:-
@echo off
:: Turn all lights on
klocks +n +c +s
:top
ping 127.0.0.1 -n 2 >nul
:: Toggle all lights
klocks !n !c !s
goto :top
Batch file to parse klocks output using a colon and a space as delimiters:-
@echo off
for /f "tokens=2,4,6 delims=: " %%a in ('klocks') do (
set num=%%a
set cap=%%b
set scr=%%c
)
if %num%==1 (echo/Num is on) else (echo/Num is off)
if %cap%==1 (echo/Caps is on) else (echo/Caps is off)
if %scr%==1 (echo/Scroll is on) else (echo/Scroll is off)
|