CALL @WIN1
_SUB WIN1,W400H450,读键盘灯或状态,
    LABE -right LABE6,L19T17W49H24,CAP(20):,,
    LABE LABEC,L69T17W45H23,CAP,,
    LABE -right LABE4,L134T17W60H22,NUM(144):,,
    LABE LABEN,L196T17W46H22,NUM,,
    LABE -right LABE5,L245T17W72H21,ScrLk(145):,,
    LABE LABES,L318T17W60H21,ScrLk,,
    LABE LABE4,L66T71W311H17, 00   01   02   03   04   05   06   07   08   09,,
    LABE LABE3,L37T88W28H323,00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25,,
    LABE LABEA,L67T88W310H322,LABE2,,
    ENVI &&V0=
    TIME Timer1,100, CALL OnTimer1
    CALL OnTimer1
_END
_SUB OnTimer1
    WAIT -scanall &V
    FIND $%&V0%=%&V%, EXIT _SUB 
    
    MSTR  &Key=<21>%&V%  //CAPLOCK 20+1
    CALC &&Y= %&Key% & 1 //    低位是否亮(乒乓状态)
    ENVI @LABEC=%&Key% %&Y%
    
    MSTR  &Key=<145>%&V%  //NUM 144+1
    CALC &&Y= %&Key% & 1 //    低位是否亮(乒乓状态)
    ENVI @LABEN=%&Key% %&Y%

    MSTR  &Key=<146>%&V%  //ScrLOCK 145+1
    CALC &&Y= %&Key% & 1 //    低位是否亮(乒乓状态)
    ENVI @LABES=%&Key% %&Y%

    TEAM ENVI &V0=%&V%| ENVI @LABEA=%&V%
_END

