CLEAR DO WHILE INKEY(1)#27 ? bitshow(ShiftState(),3) ENDDO PROCEDURE ShiftState DECLARE INTEGER GetKeyState IN user32 INTEGER nVirtKey LOCAL nBit AS INTEGER nBit = 0 nBit = IIF(BITTEST(GetKeyState( 0x10 ),8),BITSET(nBit,0),nBit) && Shift nBit = IIF(BITTEST(GetKeyState( 0x11 ),8),BITSET(nBit,1),nBit) && Ctrl nBit = IIF(BITTEST(GetKeyState( 0x12 ),8),BITSET(nBit,2),nBit) && Alt RETURN nBit ENDPROC PROCEDURE bitshow LPARAMETERS tn AS LONG , nlen AS INTEGER LOCAL s, i mlen = IIF(EMPTY(nlen),32,nlen) s = [] FOR i=0TO 31 s = IIF(BITTEST(tn,i),[1],[0]) + s NEXT RETURN RIGHT(s,nlen) ENDPROCAnother tool for your toolbox.