ConFuncKey$ function

 

Usage:

KeyText$ = ConFuncKey$ (KeyNum&)

 

Legacy Syntax:

KeyText$ = KEY$ (KeyNum&)

 

Pseudo-object Syntax:

KeyText$ = CON.KEY$ (KeyNum&)

 

Gets the string assigned to a function key.

 

If there is no string assigned to the specified function key, returns a null string.

 

The parameter KeyNum& specifies the function key (from 1 to 12). For compatibility with PB/CC, a KeyNum& value of 30 or 31 is translated to 11 or 12 respectively.

 

When the function key is pressed, the KeyText$ is sent to the console keyboard input stream to be returned by ConInKey$, ConWaitKey$ or ConInputLine. When a string is assigned to a function key and that key is pressed, the characters of the string are returned by successive calls to ConInKey$ or ConWaitKey$. The double-byte code for the function key is not returned. In PB/CC the string can be up to 15 characters long. In LJ-CC there is no specific limit to the string length.

 

Conversion:

 

#IF %DEF(%PB_CC32)

  KeyText$ = KEY$ (KeyNum&)

#ELSE

  KeyText$ = ConFuncKey (KeyNum&)

#ENDIF

 

CON.KEY$ or CONSOLE.KEY$ may be substituted for KEY$ in programs written for PB/CC 6.  The syntax " ... TO KeyText$" may be used instead of "KeyText$ = ..."

 

See Also: ConFuncKey command