[<<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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson