PTERM()

PTERM()

Top  Previous  Next

 

The PTERM() function sets, clears or queries a terminal setting.

 

 

Format

 

PTERM(action, value)

 

where

 

actionspecifies the terminal setting to be processed.

 

valuespecifies the new value. A negative value returns the current setting.

 

 

The PTERM() function can be used to set, clear or query the following terminal settings:

 

1

PT$BREAK

Interpret break character as break key? (Boolean)

2

PT$INVERT

Invert case of alphabetic characters on input? (Boolean)

3

PT$BRKCH

Sets break character to be char(value).  The value must be in the range 1 to 31. For any other value, the current setting is returned.

4

PT$PAGE.PAUSE

Set/clear page pause (Boolean)

5

PT$MARK

Set/clear translation of characters 28-30 on keyboard input to field, value and subvalue marks. (Boolean)

6

PT$BINARY

Set/clear telnet binary mode (Boolean).

7

PT$ENCODING

Sets or returns the terminal encoding. The value associated with this action identifies the encoding to be set. This may be

  0   PT$ENCODING.8BIT

  1   PT$ENCODING.UTF8

A negative value returns the currently active encoding value without change.

The encoding value is ignored for QMConsole sessions on Windows.

8

PT$ERASE

Sets erase (backspace) character to be char(value).  The value must be in the range 0 to 31 where 0 disables erase key recognition. For any other value, the unchanged current setting is returned as a character number.

9

PT$BREAK.CT

Set break inhibit counter to value, if non-negative. Always returns old value.

10

PT$CTRL.FILTER

Filter control characters in INPUT and INPUT@ other than those that are defined as edit keys? (Boolean). This setting is maintained separately for each command processor level.




 

 

Action values marked as Boolean enable the feature if value is True and disable it if value is False. The new state is returned as the value of the function. A negative value returns the current state without changing it.

 

Note that setting the erase character to 127 (the Delete key) also requires that the kdch1 element of the relevant terminfo definition is removed or modified so that this key does not clash with the internal processing of this key as a forward delete.

 

 

See also:

PTERM