📄 cons.4
字号:
.\".\" 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1986,1987,1988.\" LICENSED MATERIALS - PROPERTY OF IBM.\" REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083.\".\"$Header:cons.4_ca 11.3$.\"$ACIS:cons.4_ca 11.3$.\"$Source: /ibm/acis/usr/man/man4/RCS/cons.4_ca,v $.\" This file uses -man macros..TH CONS 4 "Sept 1988" "Space overwritten by .AC macro" " " .AC 1 0 .SH NAMEcons \- keyboard and console display interface.SH DESCRIPTIONThe keyboard and various possible displays combine to provide a terminal-likeinterface to the system. Internally, these are separate devices whichsoftware combines to emulate a normal terminal. See the appropriate manualpages for information about each display and the keyboard..PPThe keyboard adapter also supports the speaker, which is activated when the ASCII character \fBbel\fP (\fB^G\fP)is sent to the display with software.For additional information on speaker control, see \fIspeaker\fP(4)..PP.B Console Device Control.PPThe display devices, \fI/dev/ttyaed\fR, \fI/dev/ttyap16\fR, \fI/dev/ttyap8c\fR,\fI/dev/ttyapa8\fR, \fI/dev/ttyega\fR, \fI/dev/ttymono\fR, \fI/dev/ttympel\fR, \fI/dev/ttyvga\fR, and \fI/dev/tty8514\fR are allminor devices under \fI/dev/console\fR, and are all capable of displaying console output. Unique to this system is the fact that you may have one or more of thesedisplays on your workstation at a time and any one can act as a console.With only one keyboard and system mouse, the console drivermultiplexes these input devices to the many displays.All of the displays may have simultaneous logins and the usercan ``hot key'' between each display.At first, this ``input focus''is onthe first device in the above sequence to be found at initialization time. The input focuscan be manually switched to the next available display by pressing thedefault ``hot key'' <Alt><Scroll Lock>. When theinput focusis on a display, all keyboard and mouse data are sent to the process(es)that read from that display..PPIf no other console tty device is open, and only the default input emulator is used (see \fIkbdemul\fP(4)), the input focus is set to\fI/dev/console\fP. In this case, <Alt><Scroll Lock> only switcheswhich display gets console output.In the case where one or more tty devices are open, or the default inputemulator changes, \fI/dev/console\fP gets no input. It tries to send outputto the currently focused device. A user can redirect these console messagesto any tty devices with the TIOCCONS ioctl..PPTo support the many displays and the multiplexing between them, anemulator package was developed to work with the console driver.This package allows different types of emulation on input and output tobe written independently of device..PPThe display devices \fI/dev/aed\fP, \fI/dev/apa16\fP, \fI/dev/apa8c\fP,\fI/dev/apa8\fP, \fI/dev/ega\fR, \fI/dev/mono\fP, \fI/dev/mpel\fR, \fI/dev/vga\fR, and \fI/dev/ibm8514\fR are also minor devices to \fI/dev/console\fP. They are typically used by window managers and othergraphic applications. When the focus is pointed to one of these displaydevices, the console messages are put in a circular buffer (see \fIbufemul\fP(4))unless redirected with the TIOCCONS ioctl.The buffer is flushed to the screen upon closing the display device..PPThe following are generic console \fIioctls\fP defined in \fIscreen_cousf.u\fP:.TP 20CON_SELECT_SCREEN Output focus is set to display number (arg > 0) or to next display in list (arg < 0). Previous display number is returned. .TP 20CON_GET_SCREEN Just returns the current output focus display number. .TP 20EIGETD Gets the number of the current input emulator for this display. .TP 20EOGETD Gets the number of the current output emulator for this display. .TP 20EISETD Sets the input emulator and returns the previous for this display. .TP 20EOSETD Sets the output emulator and returns the previous for this display. .TP 20CON_INIT_SCREEN Initializes the specified display (arg >=0) or this display(arg < 0). .TP 20CON_GET_FOCUS_CODE Gets the current keyboard code for setting the console focus (affects xemul only). .TP 20CON_SET_FOCUS_CODE Sets the current keyboard code for setting the consolefocus (affects xemul only), and return the previous code..PPAll of the above commands take integer arguments. .PPThe following are generic console \fIioctls\fP defined in \fIconsio.h\fP: .TP 20SCRIOCGETF Gets the screen control flags for the given display number. .TP 20SCRIOCSETC Sets the screen control flags for the given display number. .PP.in +10SCRIOCGETF and SCRIOCSETC use the following structure:.DT.nfstruct screen_control { int device; /* which screen/display to control */ int switches; /* Flags for this screen */};.fi.sp 2.RS 6.TP 20CONSDEV_PRESENT Display is present on this system. This bit cannot be changed by SCRIOSETC. .TP 20CONSDEV_KERNEL Display is available to the kernel. .TP 20CONSDEV_USER Display is available to the user. .TP 20CONSDEV_INIT Display has been initialized for output. .TP 20CONSDEV_TTY Diplay has been initialuzed for output. This bit cannot be changed by SCRIOSETC..TP 20CONSDEV_GRA Graphics display has been opened directly by minor device number. This bit cannot be changed by SCRIOSETC..TP 20CONSDEV_NOINPUT Prevents the "round-robin" console focus-switching from finding this display. This flag is cleared when \fIbuf_emul\fP is closed. .TP 20SCRSETNIP Sets the no-input bit in the screen control flags for the display's current file description. .TP 20SCRCLRNIP Clears the no-input bit in the screen control flags for the display's current file description. .RE.PPThe following \fIioctl\fP is defined in \fIbufemul.h\fP: .TP 20BUFDISPINFO \fIArg\fP returns the following information about the display: .PP.RS 6.TP 20BUF_IS_ATR(arg) True when the CPU is an IBM 6152 Academic System. .TP 20BUF_IS_RTPC(arg) True when the CPU is an IBM RT PC. .TP 20BUF_GET_PCCODE(x) Get PC-Code version/type byte (IBM 6152 only). .bp.TP 20BUF_GET_VGA(arg) Get the type of display connected to the VGA. 0=none, 1=color, 2=gray. Valid only for the IBM 6152 Academic System. .TP 20BUF_GET_8514(arg) Get the type of display connected to the IBM 8514/A. 0=none, 1=color, 2=gray. Valid only for the IBM 6152 Academic System. .TP 20BUF_GET_EGA(arg) Returns the value of the switches on the EGA display. Valid only for the IBM RT PC with an EGA card installed. .RE.PPAll of the above \fIioctl\fP system calls are device-independent controls for dealing with the emulators. .PPEach emulator has its own set of \fIioctls\fP for its own emulation purposes. These other \fIiotls\fP are used in window-manager emulators for operations such as passing/positioning the mouse locator for/on the display. See the man page for any particular emulator for more information. .PP.SH NOTEOn the IBM RT PC, the kernel flashes ``98'' on the LEDs if it cannot find anyconfigured display during initialization, and then proceeds. .SH DIAGNOSTICSNone..SH FILES.PPFor the IBM RT PC:.br/dev/console .br/dev/aed .br/dev/apa16.br/dev/apa8c.br/dev/apa8.br/dev/ega.br/dev/mono.br/dev/mpel.br.PPFor the IBM 6152 Academic System:.br/dev/vga.br/dev/ibm8514.SH "SEE ALSO"bufemul(4), bus(4), ibm5081(4), ibm5151(4), ibm6153(4), ibm6154(4),ibm6155(4), ibm8514(4), ibmaed(4), ibmemul(4), kbdemul(4), speaker(4), stdemul(4), tty(4), vga(4), xemul(4), setscreen(8).br``IBM/4.3 Console Emulators'', in Volume II, Supplementary Documents
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -