Skip to main content

Advanced Topics

This chapter discusses the following advanced topics:

Disabling the Close Button of the Terminal

If you need to disable the close button (X) of the Terminal, add a registry key, as follows:

  • On 32–bit Windows machines: HKEY_LOCAL_MACHINE\SOFTWARE\InterSystems\Terminal\NoExit

    Notice the space in “Terminal”.

  • On 64–bit Windows machines:

    HKEY_LOCAL_MACHINE\SOFTWARE\ Wow6432Node \InterSystems\Terminal\NoExit=1

The NoExit value is of type REG_SZ in both cases.

Mapping of the Extended Keyboard

The Terminal supports application keyboard mode for the extended keyboard as follows:

Key Mappings
Key Mapped Value
Num Lock PF1
Keypad-divide PF2
Keypad-times PF3
Keypad-minus PF4
Keypad-plus Keypad-comma
Shift+Keypad-plus Keypad-minus
F1, F2, F3, F4 PF1, PF2, PF3, PF4 (respectively)
Shift+F1 ... Shift+F10 F11 ... F20 (respectively)

The keypad cluster of the extended keyboard is mapped as follows:

Keyboard Mappings
Key Mapped Value
Insert Insert Here
Home Find
Page Up Prev Screen
Delete Remove
End Select
Page Down Next Screen

The Pause key acts as a single XON/XOFF toggle key.

Special Modes

The Terminal provides a couple of special modes, accessible only by keyboard actions.

Key Timing Mode

To enter or exit key timing mode, press Alt+Shift+T.

This mode can help you determine performance of a host system under various load conditions. The output of a timing run is the file KEYTIMER.LOG in the Caché system manager’s directory.

Learning Mode

In learning mode, the Terminal generates a log file that you can quickly convert to a script file, after making only minor edits. When this mode is enabled, the log file is a sequence of script wait for and send commands. The wait for commands show up to 16 characters preceding the sent data.

To enter learning mode:

  1. Press Alt+L to enable logging. Then specify a log filename and directory, as described in “Logging the Terminal Session,” earlier in this book.

  2. Press Alt+Shift+L.

To exit learning mode, press Alt+Shift+L.

Using the Terminal with DDE

The Terminal supports DDE (Dynamic Data Exchange) links to permit other applications to talk to a remote host. This section assumes that you are familiar with DDE. The topics here are as follows:

  • Layout — Used to obtain status information. Examples are the row and column size, whether there is a connection, and so on.

  • Screen — Used to gather data from the Terminal screen.

  • Message — Used to send data to either the Terminal screen or the host.


A Windows task cannot discriminate between multiple instances of the Terminal when it comes to using DDE. Therefore, use DDE only if one copy of the Terminal is running.

DDE Layout Connections

The Terminal supports DDE requests for what could be considered as static information through the Layout topic.

DDE Layout Connections
Item Meaning of Returned Value
Column The number of columns of the window.
Row The number of rows of the window.
hWnd The decimal equivalent of the main window handle.
Connected A null string if there is no connection, otherwise the equivalent of the title string "mode: node"
Read A 1 if the last received character was a CTRL/A. Its use is detection of the end of screen painting.
Script A 1 if a script is currently running, otherwise 0.
Title The title of the window.

DDE Screen Connections

The Terminal supports DDE requests for screen data through the Screen topic. Currently, one POKE command is available to select which part of a screen line is desired.

DDE Screen Connections
Item Meaning of Returned Value
Cursor The current position of the cursor, in the form row;col.
Line The current line (without a CR LF).
LeftLine The left part of the current line up to but not including the character under the cursor.
RightLine The right part of the current line including the character under the cursor.
All The entire screen, each line is delimited by CR LF.
Piece The currently selected piece of a screen line (without a CR LF).

The item "Piece" can be POKEd with a string of the form "RnnCmmLpp" to cause the Piece request to retrieve (at most) pp characters on the screen line nn beginning with column mm. The top left corner of the screen is row 1, column 1.

DDE Message Connections

The Terminal supports DDE requests for data communications through the Message topic. These are implemented with DDE POKE commands.

DDE Message Connections
Item Meaning of returned value
Send The DDE message value is sent to the host if a connection is active.
Display The DDE message value is sent to the "screen" as if it were received from the host.
FeedbackOpens in a new tab