ConFuncKey command



ConFuncKey KeyNum&, KeyText$


Legacy Syntax:

KEY KeyNum&, KeyText$


Pseudo-object Syntax:

CON.KEY KeyNum&, KeyText$


Assigns a string expression to a function key.


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.




#IF %DEF(%PB_CC32)

  KEY KeyNum&, KeyText$


  ConFuncKey KeyNum&, KeyText$



CON.KEY or CONSOLE.KEY may be substituted for KEY in programs written for PB/CC 6.


See Also: ConFuncKey$ function