diff options
author | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-05-12 18:36:46 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-05-12 18:36:46 +0000 |
commit | c8a551c414eacc3d756efa21e93a8389bdafd180 (patch) | |
tree | d2a4f9b3f6ac54729b58e4b369c56f5a4572b559 /sys/man/3 | |
parent | cc8ee7f932624d6d3e6094db13fa63327e81c191 (diff) |
manpage updates
Diffstat (limited to 'sys/man/3')
-rwxr-xr-x | sys/man/3/cons | 94 | ||||
-rw-r--r-- | sys/man/3/kbd | 43 | ||||
-rw-r--r-- | sys/man/3/kbin | 36 | ||||
-rw-r--r-- | sys/man/3/kbmap | 70 |
4 files changed, 49 insertions, 194 deletions
diff --git a/sys/man/3/cons b/sys/man/3/cons index c816e1b17..4dadd7b16 100755 --- a/sys/man/3/cons +++ b/sys/man/3/cons @@ -8,7 +8,6 @@ cons \- console, clocks, process/process group ids, user, null, reboot, etc. .B /dev/bintime .B /dev/config .B /dev/cons -.B /dev/consctl .B /dev/cputime .B /dev/drivers .B /dev/hostdomain @@ -31,81 +30,18 @@ cons \- console, clocks, process/process group ids, user, null, reboot, etc. .fi .SH DESCRIPTION The console device serves a one-level directory -giving access to the console and +giving access to the console screen and miscellaneous information. .PP -Reading the -.B cons -file returns characters typed on the keyboard. -Normally, characters are buffered to enable erase and kill processing. -A control-U, -.LR ^U , -typed at the keyboard -.I kills -the current input line (removes all characters -from the buffer of characters -not yet read via -.BR cons ), -and a backspace -.I erases -the previous non-kill, non-erase character from the input buffer. -Killing and erasing only delete characters back to, but not including, -the last newline. -Characters typed at the keyboard actually produce 16-bit runes (see -.IR utf (6)), -but the runes are translated into the variable-length -.SM UTF -encoding (see -.IR utf (6)) -before putting them into the buffer. -A -.IR read (2) -of length greater than zero causes the process to wait until a -newline or a -.L ^D -ends the buffer, and then returns as much of the buffer as the argument -to -.B read -allows, but only up to one complete line. -A terminating -.L ^D -is not put into the buffer. -If part of the line remains, the next -.B read -will return bytes from that remainder and not part of any new line -that has been typed since. -.PP -If -the string -.B rawon -has been written to the -.B consctl -file and the file is still open, -.B cons -is in -.IR "raw mode" : -characters are not echoed as they are typed, -backspace, -.L ^U -and -.L ^D -are not treated specially, -and characters are available to -.I read -as soon as they are typed. -Ordinary mode is reentered when -.B rawoff -is written to -.B consctl -or this file is closed. -.PP A .I write (see .IR read (2)) to .B cons -causes the characters to be printed on the console screen. +causes the characters to be printed on the console screen. Console +input is handled by a different program (see +.IR kbdfs (8)). .PP The .B osversion @@ -352,29 +288,11 @@ process number parent's process number .SH SEE ALSO .IR draw (3), +.IR kbd (3), +.IR kbdfs (8), .IR keyboard (6), .IR authsrv (6), .IR utf (6), .IR swap (8) .SH SOURCE .B /sys/src/9/port/devcons.c -.SH BUGS -For debugging, two control-T's followed by a letter -generate console output and manage debugging: -.L ^T^Td -toggles whether the console debugger will be run if the system fails. -.L ^T^TD -starts the console debugger immediately. -.L ^T^Tk -kills the largest process; use with care. -.L ^T^Tp -prints data about processes. -.L ^T^Tq -prints the run queue for processor 0. -.L ^T^Ts -prints the kernel stack. -.L ^T^Tx -prints data about kernel memory allocation. -.PP -The system can be rebooted by typing -.LR ^T^Tr . diff --git a/sys/man/3/kbd b/sys/man/3/kbd new file mode 100644 index 000000000..b1f85f508 --- /dev/null +++ b/sys/man/3/kbd @@ -0,0 +1,43 @@ +.TH KBD 3 +.SH NAME +kbd \- pc keyboard driver +.SH SYNOPSIS +.nf +.B bind -a #b /dev + +.B /dev/scancode +.B /dev/leds +.fi +.SH DESCRIPTION +.PP +The +.I kbd +device serves a one-level directory containing the files +.BR scancode +and +.BR leds . +.PP +Reading the +.BR scancode +file returns the raw scancode stream as it is emited by the keyboard +device without any translation. It is usualy +.IR kbdfs (8) +task to interpret the scancodes and provide device independent +keyboard input to programs. The +.BR scancode +file can be only opend once by the hostowner. +.PP +Writing a number to the write only +.BR leds +file changes the status leds on the keyboard. the value of the +number is the addition of 1, 2 and 4 representing activated +Scroll, Num and Caps leds. +.SH EXAMPLE +Set the Scroll and Caps leds: +.EX +echo 5 >/dev/leds +.EE +.SH "SEE ALSO" +.IR kbdfs (8) +.SH SOURCE +.B /sys/src/9/pc/devkbd.c diff --git a/sys/man/3/kbin b/sys/man/3/kbin deleted file mode 100644 index ffc9c271d..000000000 --- a/sys/man/3/kbin +++ /dev/null @@ -1,36 +0,0 @@ -.TH KBIN 3 -.SH NAME -kbin \- external keyboard input -.SH SYNOPSIS -.nf -.B bind -a #Ι /dev -.sp 0.3v -.B /dev/kbin -.fi -.SH DESCRIPTION -The -.I kbin -device is a PC driver that -serves a one-level directory containing a single file, -.BR kbin , -which can be used to send -keyboard scan codes to the kernel. -.PP -.I Kbin -is necessary for -.IR usb (4) -drivers that handle keyboards. -Keyboard input -is processed as described in -.IR cons (3). -The scan codes correspond to the PC keyboard used by the -.IR cons (3) -driver and can be translated by the -.IR kbmap (3) -device. -.SH "SEE ALSO" -.IR cons (3), -.IR kbmap (3), -.IR keyboard (6) -.SH SOURCE -.B /sys/src/9/pc/devkbin.c diff --git a/sys/man/3/kbmap b/sys/man/3/kbmap deleted file mode 100644 index a3b9fad37..000000000 --- a/sys/man/3/kbmap +++ /dev/null @@ -1,70 +0,0 @@ -.TH KBMAP 3 -.SH NAME -kbmap \- keyboard map -.SH SYNOPSIS -.nf -.B bind -a #κ /dev - -.B /dev/kbmap -.fi -.SH DESCRIPTION -.PP -The -.I kbmap -device serves a one-level directory containing a single file, -.BR kbmap , -representing the kernel's mapping of -keyboard scan codes to Unicode characters -(see -.IR cons (3) -and -.IR keyboard (6)). -.PP -Reads return the current contents of the map. -Each entry is one line containing three 11 character numeric fields, each followed by a space: -a table number, an index into the table (scan code), and the decimal value -of the corresponding Unicode character (0 if none). -The table numbers are platform dependent; they typically distinguish -between unshifted and shifted keys. -The scan code values are hardware dependent and can vary -from keyboard to keyboard. -.PP -Writes to the file change the map. -Lines written to the file must contain three space-separated fields, -representing the table number, scan code index, and Unicode character. -Values are taken to be decimal unless they start with -.B 0x -(hexadecimal) or -.B 0 -(octal). -The Unicode character can also be represented as -.BI ' x -where -.I x -gives the UTF-8 representation of the character -(see -.IR utf (6)), -or as -.BI ^ X -to represent a control character. -.PP -The Unicode character can also be -.BI M n -to represent mouse button -.IR n . -The map -.B /sys/lib/kbmap/mouse-fn -maps the F1 through F5 keys to the three mouse buttons and the two -scroll wheel buttons. -Similarly, -.B mouse-csa -maps the left Control, Start, and Alt keys to the three mouse buttons. -These maps are useful on laptops without three-button mice. -.SH "SEE ALSO" -.IR cons (3), -.IR keyboard (6), -.IR utf (6) -.SH FILES -.B /sys/lib/kbmap/* -.SH SOURCE -.B /sys/src/9/port/devkbmap.c |