From fa671103055650db59913066e15bd89315f43365 Mon Sep 17 00:00:00 2001 From: "Rodney W. Grimes" Date: Thu, 9 Sep 1993 00:32:25 +0000 Subject: From: baukno@login.dkuug.dk (S|ren Schmidt) Subject: Patches to syscons/wd Man pages for keyboard & screen (using syscons) --- share/man/man4/keyboard.4 | 134 ++++++++++++++++++++++++++++++ share/man/man4/man4.i386/Makefile | 15 +++- share/man/man4/man4.i386/keyboard.4 | 134 ++++++++++++++++++++++++++++++ share/man/man4/man4.i386/screen.4 | 157 ++++++++++++++++++++++++++++++++++++ share/man/man4/screen.4 | 157 ++++++++++++++++++++++++++++++++++++ 5 files changed, 593 insertions(+), 4 deletions(-) create mode 100644 share/man/man4/keyboard.4 create mode 100644 share/man/man4/man4.i386/keyboard.4 create mode 100644 share/man/man4/man4.i386/screen.4 create mode 100644 share/man/man4/screen.4 (limited to 'share') diff --git a/share/man/man4/keyboard.4 b/share/man/man4/keyboard.4 new file mode 100644 index 000000000000..0a8b0d514197 --- /dev/null +++ b/share/man/man4/keyboard.4 @@ -0,0 +1,134 @@ +.Dd April 7, 1993 +.Dt KEYBOARD 4 +.Os FreeBSD +.Sh NAME +.Nm keyboard +.Nd pc keyboard interface +.Sh DESCRIPTION + +The PC keyboard is use as the console character input device. The keyboard +is owned by the current virtual console. +To switch between the virtual consoles use the sequence +.Ar ALT+Fn +, which means hold down ALT and press one of the function keys. The +virtual console with the same number as the function key is then +selected as the current virtual console, and given exclusive use of +the keyboard and display. + +The console allows entering values that are not physically +present on the keyboard via a special keysequence. +To use this facility press and hold down ALT, +then enter a decimal number from 0-255 via the numerical keypad, then +release ALT. The entered value is then used as the ASCII value for one +character. This way it is possible to enter any ASCII value. +The keyboard is configurable to suit the individual user and the different +national layout. + +The keys on the keyboard can have any of the following functions: + + Normal key - Enter the ASCII value associated with the key. + + Function key - Enter a string of ASCII values. + + Switch Key - Switch virtual console. + + Modifier Key - Change the meaning of another key. + + +The keyboard is seen as a number of keys numbered from 1 to n. This +number is often referred to as the "scancode" for a given key. The number +of the key is transmitted as an 8 bit char with bit 7 as 0 when a key is +pressed, and the number with bit 7 as 1 when released. This makes it +possible to make the mapping of the keys fully configurable. + +The meaning of every key is programmable via the PIO_KEYMAP ioctl call, that +takes a structure keymap_t as argument. The layout of this structure is as +follows: +.Pp +.Bd -literal -offset indent + struct keymap { + u_short n_keys; + struct key_t { + u_char map[NUM_STATES]; + u_char spcl; + u_char flgs; + } key[NUM_KEYS]; + }; +.Ed +.Pp +The field n_keys tells the system how many keydefinitions (scancodes) +follows. Each scancode is then specified in the key_t substructure. + +Each scancode can be translated to any of 8 different values, depending +on the shift, control, and alt state. These eight possibilities is +represented by the map array, as shown below: + + alt + scan cntrl alt alt cntrl + code base shift cntrl shift alt shift cntrl shift + map[n] 0 1 2 3 4 5 6 7 + ---- ------------------------------------------------------ + 0x1E 'a' 'A' 0x01 0x01 'a' 'A' 0x01 0x01 + +This is the default mapping for the key labelled 'A' wich normally has +scancode 0x1E. The eight states is as shown, giving the 'A' key its +normal behavior. +The spcl field is used to give the key "special" treatment, and is +interpreted as follows. +Each bit correspond to one of the states above. If the bit is 0 the +key emits the number defined in the corresponding map[] entry. +If the bit is 1 the key is "special". This means it does not emit +anything, instead it changes the "state". That means it is a shift, +control, alt, lock, switch-screen, function-key or no-op key. +The bitmap is backwards ie. 7 for base, 6 for shift etc. + +The flgs field defines if the key should react on caps-lock (1), +num-lock (2), both (3) or ignore both (0). + +The mapkbd utility is used to load such a description into/outof +the kernel at runtime. This make it possible to change the key +assignments at runtime, or more important to get (GIO_KEYMAP ioctl) +the exact key meanings from the kernel (fx. used by the X server). + +The function keys can be programmed using the PIO_STRMAP ioctl call. + +This ioctl takes a argument of the type fkeyarg_t: +.Bd -literal -offset indent + struct fkeyarg { + u_short keynum; + char keydef[MAXFK]; + char flen; + }; +.Ed +.Pp +The field keynum defines which function key that is programmed. +The array keydef should contain the new string to be used (MAXFK long), +and the length should be entered in flen. + +The GIO_STRMAP ioctl call works in a semilar manner, execpt it returns +the current setting of keynum. + +The function keys are numbered like this: +.Bd -literal -offset indent + F1-F12 key 1 - 12 + Shift F1-F12 key 13 - 24 + Ctrl F1-F12 key 25 - 36 + Ctrl+shift F1-F12 key 37 - 48 + + Home key 49 + Up arrow key 50 + Page Up key 51 + (keypad) - key 52 + Left arrow key 53 + (keypad) 5 key 54 + Right arrow key 55 + (keypad) + key 56 + End key 57 + Down arrow key 58 + Page down key 59 + Insert key 60 +.Ed +.Pp +.Sh AUTHOR + S_ren Schmidt + Email: (baukno@login.dkuug.dk -or- sos@kmd-ac.dk) diff --git a/share/man/man4/man4.i386/Makefile b/share/man/man4/man4.i386/Makefile index b95ebb7d6290..658c21c58ecc 100644 --- a/share/man/man4/man4.i386/Makefile +++ b/share/man/man4/man4.i386/Makefile @@ -1,10 +1,17 @@ # @(#)Makefile 0.1 (RWGrimes) 3/25/93 -MAN4= com.4 lpa.4 lpt.4 mem.4 npx.4 sio.4 spkr.4 +MAN4= com.4 keyboard.4 lpa.4 lpt.4 mem.4 npx.4 screen.4 sio.4 spkr.4 -MLINKS= com.4 ../com.4 lpa.4 ../lpa.4 lpt.4 ../lpt.4 -MLINKS+= mem.4 ../mem.4 mem.4 ../kmem.4 npx.4 ../npx.4 -MLINKS+= sio.4 ../sio.4 spkr.4 ../spkr.4 +MLINKS= com.4 ../com.4 +MLINKS+= keyboard.4 ../keyboard.4 +MLINKS+= lpa.4 ../lpa.4 +MLINKS+= lpt.4 ../lpt.4 +MLINKS+= mem.4 ../mem.4 +MLINKS+= mem.4 ../kmem.4 +MLINKS+= npx.4 ../npx.4 +MLINKS+= screen.4 ../screen.4 +MLINKS+= sio.4 ../sio.4 +MLINKS+= spkr.4 ../spkr.4 MANSUBDIR=/i386 diff --git a/share/man/man4/man4.i386/keyboard.4 b/share/man/man4/man4.i386/keyboard.4 new file mode 100644 index 000000000000..0a8b0d514197 --- /dev/null +++ b/share/man/man4/man4.i386/keyboard.4 @@ -0,0 +1,134 @@ +.Dd April 7, 1993 +.Dt KEYBOARD 4 +.Os FreeBSD +.Sh NAME +.Nm keyboard +.Nd pc keyboard interface +.Sh DESCRIPTION + +The PC keyboard is use as the console character input device. The keyboard +is owned by the current virtual console. +To switch between the virtual consoles use the sequence +.Ar ALT+Fn +, which means hold down ALT and press one of the function keys. The +virtual console with the same number as the function key is then +selected as the current virtual console, and given exclusive use of +the keyboard and display. + +The console allows entering values that are not physically +present on the keyboard via a special keysequence. +To use this facility press and hold down ALT, +then enter a decimal number from 0-255 via the numerical keypad, then +release ALT. The entered value is then used as the ASCII value for one +character. This way it is possible to enter any ASCII value. +The keyboard is configurable to suit the individual user and the different +national layout. + +The keys on the keyboard can have any of the following functions: + + Normal key - Enter the ASCII value associated with the key. + + Function key - Enter a string of ASCII values. + + Switch Key - Switch virtual console. + + Modifier Key - Change the meaning of another key. + + +The keyboard is seen as a number of keys numbered from 1 to n. This +number is often referred to as the "scancode" for a given key. The number +of the key is transmitted as an 8 bit char with bit 7 as 0 when a key is +pressed, and the number with bit 7 as 1 when released. This makes it +possible to make the mapping of the keys fully configurable. + +The meaning of every key is programmable via the PIO_KEYMAP ioctl call, that +takes a structure keymap_t as argument. The layout of this structure is as +follows: +.Pp +.Bd -literal -offset indent + struct keymap { + u_short n_keys; + struct key_t { + u_char map[NUM_STATES]; + u_char spcl; + u_char flgs; + } key[NUM_KEYS]; + }; +.Ed +.Pp +The field n_keys tells the system how many keydefinitions (scancodes) +follows. Each scancode is then specified in the key_t substructure. + +Each scancode can be translated to any of 8 different values, depending +on the shift, control, and alt state. These eight possibilities is +represented by the map array, as shown below: + + alt + scan cntrl alt alt cntrl + code base shift cntrl shift alt shift cntrl shift + map[n] 0 1 2 3 4 5 6 7 + ---- ------------------------------------------------------ + 0x1E 'a' 'A' 0x01 0x01 'a' 'A' 0x01 0x01 + +This is the default mapping for the key labelled 'A' wich normally has +scancode 0x1E. The eight states is as shown, giving the 'A' key its +normal behavior. +The spcl field is used to give the key "special" treatment, and is +interpreted as follows. +Each bit correspond to one of the states above. If the bit is 0 the +key emits the number defined in the corresponding map[] entry. +If the bit is 1 the key is "special". This means it does not emit +anything, instead it changes the "state". That means it is a shift, +control, alt, lock, switch-screen, function-key or no-op key. +The bitmap is backwards ie. 7 for base, 6 for shift etc. + +The flgs field defines if the key should react on caps-lock (1), +num-lock (2), both (3) or ignore both (0). + +The mapkbd utility is used to load such a description into/outof +the kernel at runtime. This make it possible to change the key +assignments at runtime, or more important to get (GIO_KEYMAP ioctl) +the exact key meanings from the kernel (fx. used by the X server). + +The function keys can be programmed using the PIO_STRMAP ioctl call. + +This ioctl takes a argument of the type fkeyarg_t: +.Bd -literal -offset indent + struct fkeyarg { + u_short keynum; + char keydef[MAXFK]; + char flen; + }; +.Ed +.Pp +The field keynum defines which function key that is programmed. +The array keydef should contain the new string to be used (MAXFK long), +and the length should be entered in flen. + +The GIO_STRMAP ioctl call works in a semilar manner, execpt it returns +the current setting of keynum. + +The function keys are numbered like this: +.Bd -literal -offset indent + F1-F12 key 1 - 12 + Shift F1-F12 key 13 - 24 + Ctrl F1-F12 key 25 - 36 + Ctrl+shift F1-F12 key 37 - 48 + + Home key 49 + Up arrow key 50 + Page Up key 51 + (keypad) - key 52 + Left arrow key 53 + (keypad) 5 key 54 + Right arrow key 55 + (keypad) + key 56 + End key 57 + Down arrow key 58 + Page down key 59 + Insert key 60 +.Ed +.Pp +.Sh AUTHOR + S_ren Schmidt + Email: (baukno@login.dkuug.dk -or- sos@kmd-ac.dk) diff --git a/share/man/man4/man4.i386/screen.4 b/share/man/man4/man4.i386/screen.4 new file mode 100644 index 000000000000..a0df69cc3c5f --- /dev/null +++ b/share/man/man4/man4.i386/screen.4 @@ -0,0 +1,157 @@ +.Dd April 7, 1993 +.Dt SCREEN 4 +.Os FreeBSD +.Sh NAME +.Nm screen +.Nd pc display interface +.Sh DESCRIPTION + +Access to the +.Ar virtual consoles +are obtained through the device files +tty01 - ttynn in /dev. +Each of these files correspond to a seperate +virtual console. +All virtual console devices can be open at once, but only one is +active at a time. The active virtual console "owns" the keyboard and +display screen. +.Pp +Output to a virtual console that not currently is on the display is +saved in a buffer that holds a "screenfull" (normally 25) lines. +Any output written to +.Ar /dev/console +(the original console device) is echoed to /dev/tty01. +.Pp +To switch between the virtual consoles one uses the sequence +.Ar ALT+Fn +, which means hold down ALT and press one of the function keys. The +virtual console with the same number as the function key is then +selected as the current virtual console, and given exclusive use of +the keyboard and display. This switch sequence can be changed via +the keyboard mapping ioctl call (see keyboard.man) +.Pp +The number of virtual consoles is changeable in the system config +file, and need recompilation of the kernel to take any effect. The +default is 12. + +The console allows entering values that are not physically +present on the keyboard via a special keysequence. +To use this facility press and hold down ALT, +then enter a decimal number from 0-255 via the numerical keypad, then +release ALT. The entered value is then used as the ASCII value for one +character. This way it is possible to enter any ASCII value. + +The console understands a subset of the ANSI x3.64 character +sequences. For compatibility with the old pccons, the PC3 character +sequences is also supported. +.Pp +.Bd -literal +ANSI Seq Function Termcap entry +======= ======= ===================================== ============== + +CUU E[nA move cursor up n lines up (ku) + +CUD E[nB move cursor down n lines do (kd) + +CUF E[nC move cursor right n characters nd (kr) + +CUB E[nD move cursor left n characters bs (kl) + +HPA E[n` move cursor character position n -- + +HPR E[na move cursor right n characters -- + +VPA E[nd move cursor to line n -- + +VPR E[ne move cursor down n lines -- + +CPL E[nF move cursor to start of line, -- + n lines up + +CNL E[nF move cursor to start of line, -- + n lines down + +CUP E[y;xH Move cursor to x, y cm + +HVP E[y;xf Move cursor to x, y -- + +CBT E[nZ Move cursor back n tab stops bt + +IL E[nL Insert n blank lines al + +ICH E[n@ Insert n blank characters ic + +DL E[nM Delete n lines dl + +DCH E[nP Delete n characters dc + +ED E[nJ Erase part or all of display: cd + n=0 from cursor to end of display, + n=1 from begin of display to cursor, + n=2 entire display. + +EL E[nK Erase part or all of line: ce + n=0 from cursor to end of line, + n=1 from begin of line to cursor, + n=2 entire line. + +ECH E[nX Erase n characters -- + +SU E[nS Scroll display n lines up (forward) sf + +SD E[nT Scroll display n lines down (reverse) sr + + +SGR E[nm Set character attributes: -- + n= 0 normal attribute (all off) + n= 1 bold (highlight) + n= 4 underscore (if supported by HW) + n= 5 blink (if supported by HW) + n= 7 reverse + n=3X set foreground color (see table) + n=4X set background color (see table) + + X=0 black X=1 red + X=2 green X=3 brown + X=4 blue X=5 magenta + X=6 cyan X=7 white + + +-- E[=p;dB Set bell pitch (p) and duration (d), -- + picth is in units of 840 nS, + duration is units of 0,1 S. + +-- E[=s:eC Set cursor start and end scanline, -- + start on line s, end on line e. + +-- E[=nA Set the border color to color n + (see table) (if supported by HW) + +-- E[=cF set normal foreground color to n -- + (see table) + +-- E[=cG set normal background color to n -- + (see table) + +-- E[=cH set reverse foreground color to n -- + (see table) + +-- E[=cI set reverse background color to n -- + (see table) + + n= 0 black n= 8 grey + n= 1 blue n= 9 light blue + n= 2 green n=10 light green + n= 3 cyan n=11 light cyan + n= 4 red n=12 light red + n= 5 magenta n=13 light magenta + n= 6 brown n=14 yellow + n= 7 white n=15 light white + +note: the first E in the sequences stands for ESC (0x1b) + +.Ed +.Pp +.Sh AUTHOR + S_ren Schmidt + Email: (baukno@login.dkuug.dk -or- sos@kmd-ac.dk) diff --git a/share/man/man4/screen.4 b/share/man/man4/screen.4 new file mode 100644 index 000000000000..a0df69cc3c5f --- /dev/null +++ b/share/man/man4/screen.4 @@ -0,0 +1,157 @@ +.Dd April 7, 1993 +.Dt SCREEN 4 +.Os FreeBSD +.Sh NAME +.Nm screen +.Nd pc display interface +.Sh DESCRIPTION + +Access to the +.Ar virtual consoles +are obtained through the device files +tty01 - ttynn in /dev. +Each of these files correspond to a seperate +virtual console. +All virtual console devices can be open at once, but only one is +active at a time. The active virtual console "owns" the keyboard and +display screen. +.Pp +Output to a virtual console that not currently is on the display is +saved in a buffer that holds a "screenfull" (normally 25) lines. +Any output written to +.Ar /dev/console +(the original console device) is echoed to /dev/tty01. +.Pp +To switch between the virtual consoles one uses the sequence +.Ar ALT+Fn +, which means hold down ALT and press one of the function keys. The +virtual console with the same number as the function key is then +selected as the current virtual console, and given exclusive use of +the keyboard and display. This switch sequence can be changed via +the keyboard mapping ioctl call (see keyboard.man) +.Pp +The number of virtual consoles is changeable in the system config +file, and need recompilation of the kernel to take any effect. The +default is 12. + +The console allows entering values that are not physically +present on the keyboard via a special keysequence. +To use this facility press and hold down ALT, +then enter a decimal number from 0-255 via the numerical keypad, then +release ALT. The entered value is then used as the ASCII value for one +character. This way it is possible to enter any ASCII value. + +The console understands a subset of the ANSI x3.64 character +sequences. For compatibility with the old pccons, the PC3 character +sequences is also supported. +.Pp +.Bd -literal +ANSI Seq Function Termcap entry +======= ======= ===================================== ============== + +CUU E[nA move cursor up n lines up (ku) + +CUD E[nB move cursor down n lines do (kd) + +CUF E[nC move cursor right n characters nd (kr) + +CUB E[nD move cursor left n characters bs (kl) + +HPA E[n` move cursor character position n -- + +HPR E[na move cursor right n characters -- + +VPA E[nd move cursor to line n -- + +VPR E[ne move cursor down n lines -- + +CPL E[nF move cursor to start of line, -- + n lines up + +CNL E[nF move cursor to start of line, -- + n lines down + +CUP E[y;xH Move cursor to x, y cm + +HVP E[y;xf Move cursor to x, y -- + +CBT E[nZ Move cursor back n tab stops bt + +IL E[nL Insert n blank lines al + +ICH E[n@ Insert n blank characters ic + +DL E[nM Delete n lines dl + +DCH E[nP Delete n characters dc + +ED E[nJ Erase part or all of display: cd + n=0 from cursor to end of display, + n=1 from begin of display to cursor, + n=2 entire display. + +EL E[nK Erase part or all of line: ce + n=0 from cursor to end of line, + n=1 from begin of line to cursor, + n=2 entire line. + +ECH E[nX Erase n characters -- + +SU E[nS Scroll display n lines up (forward) sf + +SD E[nT Scroll display n lines down (reverse) sr + + +SGR E[nm Set character attributes: -- + n= 0 normal attribute (all off) + n= 1 bold (highlight) + n= 4 underscore (if supported by HW) + n= 5 blink (if supported by HW) + n= 7 reverse + n=3X set foreground color (see table) + n=4X set background color (see table) + + X=0 black X=1 red + X=2 green X=3 brown + X=4 blue X=5 magenta + X=6 cyan X=7 white + + +-- E[=p;dB Set bell pitch (p) and duration (d), -- + picth is in units of 840 nS, + duration is units of 0,1 S. + +-- E[=s:eC Set cursor start and end scanline, -- + start on line s, end on line e. + +-- E[=nA Set the border color to color n + (see table) (if supported by HW) + +-- E[=cF set normal foreground color to n -- + (see table) + +-- E[=cG set normal background color to n -- + (see table) + +-- E[=cH set reverse foreground color to n -- + (see table) + +-- E[=cI set reverse background color to n -- + (see table) + + n= 0 black n= 8 grey + n= 1 blue n= 9 light blue + n= 2 green n=10 light green + n= 3 cyan n=11 light cyan + n= 4 red n=12 light red + n= 5 magenta n=13 light magenta + n= 6 brown n=14 yellow + n= 7 white n=15 light white + +note: the first E in the sequences stands for ESC (0x1b) + +.Ed +.Pp +.Sh AUTHOR + S_ren Schmidt + Email: (baukno@login.dkuug.dk -or- sos@kmd-ac.dk) -- cgit v1.2.3