Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>scankey()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 SCANKEY()
 Queries scan code of keyboard input
------------------------------------------------------------------------------
 Syntax

     SCANKEY([<lMode>]) --> nKeyValue

     Warning!  Augmented from CA-Clipper Tools.  This is new optional
     parameter.

 Argument

     <lMode>  Designates whether or not to ignore the additional keys on
     the European extended keyboard.

 Returns

     SCANKEY() returns the scan code for the key pressed.

 Description

     SCANKEY() returns an untranslated scan code for a key.  This allows you
     to differentiate between keys or key combinations that return the same
     INKEY() value.  SCANKEY() does not take the character out of the buffer.
     The function waits for a keyboard input and returns the scan code which
     corresponds.  The third example shows how a returned value is converted
     into something you can display, as in CTSCAN.CH by SCANKEY().  Although
     it depends on the keyboard, the scan codes may differ from those listed
     in CTSCAN.CH.

 Note

     .  No key traps (including the CA-Clipper internal key traps),
        are acknowledged.

 Examples

     .  Return with input of Ctrl-W:

        ? INKEY()                // 23
        ? SCANKEY()              // 4375
        ? NUMLOW(SCANKEY())      // 23
        ? NUMHIGH(SCANKEY())     // 17

     .  When inputting Ctrl-End (numeric key pad), return:

        ? INKEY()                // 23
        ? SCANKEY()              // 29952
        ? NUMLOW(SCANKEY())      // 0
        ? NUMHIGH(SCANKEY())     // 117

     .  Reuse codes with other functions:

        nCode  :=  SCANKEY()
        SETKXLAT(CHR(NUMLOW(nCode)) * CHR(NUMHIGH(nCode)), -1)


See Also: NUMHIGH() DSETKBIOS()

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