]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/man/8/kbdfs
kbdfs: allow to escape ctlr-alt-del with shift for vmx and vnc.
[plan9front.git] / sys / man / 8 / kbdfs
index f97bf6f85dbaa7e78db51f00394ace95b1c6d3d5..93e0a2e61cc42a9630f151946008fb30586f176d 100644 (file)
@@ -1,6 +1,6 @@
 .TH KBDFS 8
 .SH NAME
-kbdfs \- keyboard and console filesystem
+kbdfs, console \- keyboard and console filesystem
 .SH SYNOPSIS
 .B aux/kbdfs
 [
@@ -12,7 +12,7 @@ kbdfs \- keyboard and console filesystem
 .B -m
 .I mntpnt
 ] [
-.I filename
+.I consfile
 ]
 .nf
 
@@ -20,9 +20,16 @@ kbdfs \- keyboard and console filesystem
 .B /dev/cons
 .B /dev/consctl
 .B /dev/kbd
+.B /dev/kbdin
 .B /dev/kbin
 .B /dev/kbmap
 .fi
+.PP
+.B console
+[
+.I cmd
+.I args...
+]
 .SH DESCRIPTION
 .PP
 Started on 
@@ -34,7 +41,9 @@ translates raw keyboard scancodes from
 .IR kbd (3))
 and its
 .BR kbin
-file and optionaly reads console input from
+and
+.BR kbdin
+file and optionally reads console input from
 .I consfile
 to provide initial keyboard and console input.
 .PP
@@ -42,6 +51,7 @@ It serves a one-level directory containing the files
 .BR cons,
 .BR consctl,
 .BR kbd,
+.BR kbdin,
 .BR kbin
 and
 .BR kbmap.
@@ -77,6 +87,17 @@ mounts itself on
 otherwise on
 .B /dev
 (the default).
+.PP
+The
+.B console
+command executes
+.I cmd
+(defaults to the system shell)
+under its own
+.I kbdfs
+instance providing a serial console if
+.B $console
+environment variable is set.
 .SS Console
 .PP
 Reading the
@@ -147,14 +168,43 @@ to
 causes the characters to be printed on the console screen.
 .PP
 When a
-.I filename
+.I consfile
 is passed to
 .IR kbdfs (8)
 as its last argument, it reads and processes the
 characters from that file and forwards them to the
 .BR cons
 file with the same text processing applied as on keyboard input.
-This is used on serial consoles.
+This is used to provide a serial console when
+.B $console
+environment variable is set. (see
+.IR plan9.ini (8)).
+.PP
+Holding
+.LR Ctrl
++
+.LR Alt
+and then pressing the
+.LR Del
+key will
+trigger a reboot of the terminal.
+To forward this sequence downstream,
+.LR Shift
++
+.LR Ctrl
++
+.LR Alt
+and then pressing
+.LR Del
+will cause to send a
+.LR Shift
+up before the
+.LR Del
+key.
+This is usefull for programs like
+.IR vnc (1)
+and
+.IR vmx (1).
 .SS Keyboard
 A read on the
 .BR kbd
@@ -167,21 +217,13 @@ followed by a null terminated, variable-length,
 .SM UTF
 encoded string. The
 .B k
-message is send when a key is pressed down
+message is sent when a key is pressed down
 and
 .B K
 when a key is released. The following string contains all the keycodes
-of the keys that are currently pressed down in decomposed form. 
+of the keys that are currently pressed down in unshifted form. 
 This includes all keys that have a keyboard mapping and modifier keys.
-Some keys may produce multiple characters like
-.B Shift
-and
-.B a
-will produce
-.B Shift,
-.B a,
-.B A
-in the string. The string following the
+The string following the
 .B c
 message contains the single character that would have been returned
 on the
@@ -189,20 +231,39 @@ on the
 file instead. The
 .B c
 message will be resent at the keyboard repeat rate.
-Each
+A single
 .IR read (2)
-will return a single message or block until there are new messages
-available. Opening the
+can return multiple concatenated messages at once (delimited by the null byte)
+or block when there are no messages queued. Opening the
 .BR kbd
 file disables input processing on the
 .BR cons
 file until it is closed again.
 .PP
+.B K,
+.B k
+and
+.B c
+messages can be written to
+.BR kbdin
+and will forwarded to the reader of
+.BR cons
+or
+.BR kbd.
+Writing a
+.B r
+or
+.B R
+message followed by a
+.SM UTF
+encoded rune will simulate the press or
+release of that particular rune.
+.PP
 Raw scancodes can be written to the
 .BR kbin
 file for external keyboard input (used for USB keyboards).
 .SS "Keyboard map"
-Scancodes are maped to Unicode characters with a number of
+Scancodes are mapped to Unicode characters with a number of
 translation tables. These tables can be accessed with the
 .BR kbmap
 file.
@@ -239,8 +300,14 @@ to represent a control character.
 .IR cons (3),
 .IR keyboard (6),
 .IR utf (6),
-.IR kbd (3)
+.IR kbd (3),
+.IR plan9.ini (8)
 .SH FILES
-.B /dev/lib/kbmap/*
+.B /sys/lib/kbmap/*
 .SH SOURCE
 .B /sys/src/cmd/aux/kbdfs
+.br
+.B /rc/bin/console
+.SH HISTORY
+.I Kbdfs
+first appeared in 9front (May, 2011).