keyboard – how to type characters|
Keyboards are idiosyncratic. It should be obvious how to type
ordinary ASCII characters, backspace, tab, escape, and newline.
In Plan 9, the key labeled Return or Enter generates a newline
(0x0A); if there is a key labeled Line Feed, it generates a carriage
return (0x0D); Plan 9 eschews CRLFs. All control
characters are typed in the usual way; in particular, control–J
is a line feed and control–M a carriage return. On the PC and some
other machines, the key labeled Caps Lock acts as an additional
control key. |
The delete character (0x7F) may be generated by a different key, one near the extreme upper right of the keyboard. On the Next it is the key labeled * (not the asterisk above the 8). On the other keyboards, the key labeled Del or Delete generates the delete character.
The view character (0x80), used by rio(1), acme(1), and sam(1), causes windows to scroll forward. It is generally somewhere near the lower right of the main key area. The scroll character is generated by the VIEW key on the Gnot, and the arrow key ↓ on the other terminals. As a convenience for sloppy typists, some programs interpret → and ← keys, which lie on either side of ↓, as view keys as well. The arrow key ↑ scrolls backward.
Characters in Plan 9 are runes (see utf(6)). Any rune can be typed
using a compose key followed by several other keys. The compose
key is also generally near the lower right of the main key area:
the NUM PAD key on the Gnot, the Alternate key on the Next, the
Option key on the Magnum, and either Alt key on
the PC. After typing the compose key, type a capital X and exactly
four hexadecimal characters (digits and a to f) to type a single
two–byte rune with the value represented by the typed number. Type
a lower case x and exactly UTFmax*2 hexadecimal characters to
type a single UTFmax bytes rune. There are
shorthands for many characters, comprising the compose key followed
by a two– or three–character sequence. There are several rules guiding
the design of the sequences, as illustrated by the following examples.
The full list is too long to repeat here, but is contained in
the file /lib/keyboard in a format suitable
for grep(1) or look(1).
/lib/keyboard sorted table of characters and keyboard sequences|
intro(1), ascii(1), tcs(1), acme(1), rio(1), sam(1), cons(3),