CT_SCANKEY

 SCANKEY()
 Queries scan code of keyboard input
------------------------------------------------------------------------------
 Syntax

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

     Warning!  Augmented from 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 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()



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.