The C$KEYMAP routine maintains a stack of keyboard configurations. This routine is used to save the current keyboard configuration just before you change it. You can then later restore the original configuration by another call to this routine. The ACUCOBOL-GT debugger uses this routine before reprogramming the keyboard for its use.
CALL "C$KEYMAP" USING KEYSTROKE-SETTING, STATUS-VAL
|KEYSTROKE-SETTING Numeric parameter||Dictates whether to save (1) or restore (0) the keyboard settings.|
|STATUS-VAL COMP-1 (optional)||Returns 1 if successful, 0 otherwise.|
If KEYSTROKE-SETTING is set to 1, then the current KEYSTROKE settings are pushed onto a stack. If it is 0, then the KEYSTROKE settings are restored from the stack and the stack is popped. For a description of KEYSTROKE settings, see the ACUCOBOL-GT User's Guide, The KEYSTROKE variable.
The keyboard stack has space for 10 entries. One of these should be reserved for use by the debugger. If the stack overflows, or inadequate dynamic memory is available to save the keyboard configuration, then this routine does nothing.
This routine may optionally be passed a second parameter. This must be a COMP-1 field. It is set to 1 if the routine succeeds. It is set to 0 if the stack is full or inadequate memory is available.
The NOTEPAD.CBL sample program provided with ACUCOBOL-GT contains an example of the use of this routine.