Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- dBsee 4.6 - The Library - <b>dfled()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
dfLed()
Switch a keyboard led on
------------------------------------------------------------------------------
Syntax:

     dfLed( [<nLed>] ) --> nOld

Parameters:

     <nLed>     led number.
     +--------------------+
     | # |   Meaning      |
     |---+----------------|
     | 0 |   Turn off     |
     | 1 |   ScrollLock   |
     | 2 |   NumLock      |
     | 4 |   CapsLock     |
     +--------------------+

Returns:

     <nOld> Old led value.

Description:

     Switch on one or more keyboard leds. If <nLed> is not specified, this
     function simply returns the current value.

Example:

     /************************************/
     /* Keyboard Led Modification        */
     /************************************/
     #include "inkey.ch"
     
     #define  INT_WAIT  0.5
     * ####################################
     PROCEDURE Main()
     * ####################################
     LOCAL nCount
     LOCAL nOldLed := dfLed()
     
     ? ". See the Keyboard LED !!"
     
     FOR nCount := 1 TO 10
        dfLed( 1 )
        Inkey(INT_WAIT)
        dfLed( 4 )
        Inkey(INT_WAIT)
        dfLed( 2 )
        Inkey(INT_WAIT)
        dfLed( 4 )
        Inkey(INT_WAIT)
     NEXT
     
     FOR nCount := 1 TO 10
        dfLed( 0 )
        Inkey(INT_WAIT)
        dfLed( 1 )
        Inkey(INT_WAIT)
        dfLed( 5 )
        Inkey(INT_WAIT)
        dfLed( 7 )
        Inkey(INT_WAIT)
        dfLed( 5 )
        Inkey(INT_WAIT)
        dfLed( 1 )
        Inkey(INT_WAIT)
     NEXT
     
     dfLed( nOldLed )
     
     RETURN

See also:

     dfCpu(), dfDskSer()

See Also: dfCpu() dfDskSer()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson