ConKbdHndl function



Handle??? = ConKbdHndl


Legacy Syntax:

Handle??? = GETSTDKBD


Pseudo-object Syntax:



Gets the Windows API handle of the keyboard attached to the console.


It is normally only necessary to get this handle if you wish to use API functions. The returned handle can also be used with the OPEN HANDLE statement, if you wish to treat keyboard input as a file.


If no console input has been opened, returns zero. This function returns the console input handle. If you need the console output handle, use the ConPageHndl function.


Redirection can cause the console keyboard handle to be different from the standard input handle. This function always returns the handle of the keyboard attached to the console independently of any redirection state.




#IF %DEF(%PB_CC32)

  Handle??? = GETSTDKBD


  Handle??? = ConKbdHndl



CON.GETSTDKBD or CONSOLE.GETSTDKBD may be substituted for GETSTDKBD in programs written for PB/CC 6. The syntax " ... TO Handle???" may be used instead of "Handle??? = ..."


See Also: ConPageHndl, StdInHndl