Microsoft Store
 

Computer terminal


 

A computer terminal is an electronic or electromechanical hardware device used for entering data into, and displaying data from, a computer or a computing system.

Technical discussion

For an application, the simplest way to use a terminal is to simply write and read text strings to and from it sequentially. The output text is scrolled, so that only the n last lines are visible. The input text is buffered until the Enter key is pressed, so the application receives a ready string of text. In this mode, the application needs not to know much about the terminal.

Related Topics:
Buffer - Enter

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

For many interactive applications this is not sufficient. One of the common enhancements is command line editing (assisted with such libraries as readline); it also may give access to command history. This is very helpful for various interactive shells.

Related Topics:
Readline - Shells

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Even more advanced interactivity is provided with full-screen applications. Those applications completely control the screen layout; also they respond to key-pressing immediately. This mode is very useful for text editors, file managers and web browsers. In addition, such programs control the color and brightness of text on the screen, and decorate it with underline, blinking and special characters (e.g. box drawing characters).

Related Topics:
Text editor - File manager - Web browser - Box drawing characters

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

To achieve all this, the application must deal not only with plain text strings, but also with control characters and escape sequences, which allow to move cursor to an arbitrary position, to clear portions of the screen, change colors and display special characters — and also respond to function keys.

Related Topics:
Control character - Escape sequence - Cursor - Function key

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

The great problem here is that there are so many different terminals and terminal emulators, each with its own set of escape sequences. In order to overcome this, special libraries (such as curses) have been created, together with terminal description databases, such as termcap and terminfo. Unfortunately, the libraries, the databases and the terminal emulators themselves are too often buggy, so it is not unusual to see the display imperfect or garbled, or functional keys not working. Often it is necessary to hand-edit the terminfo definition to make a terminal emulator to work well. Perhaps things are the best with xterm, because it is the most used.

Related Topics:
Terminal emulator - Escape sequence - Libraries - Curses - Xterm

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

In addition, non-Western users often find their national character sets unsupported.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

All this has led to little usability of many text-mode applications except when on console or in xterm.

Related Topics:
Usability - Console - Xterm

~ ~ ~ ~ ~ ~ ~ ~ ~ ~

In recent years, the general switching of users to GUI has lessened the attention paid to terminal-handling libraries and to terminal emulation, and almost stalled the debugging efforts.

~ ~ ~ ~ ~ ~ ~ ~ ~ ~