2005-07-18 22:47:21 +00:00
|
|
|
|
.TH KEYBOARD 7
|
|
|
|
|
.SH NAME
|
|
|
|
|
keyboard \- how to type characters
|
|
|
|
|
.SH DESCRIPTION
|
|
|
|
|
Keyboards are idiosyncratic.
|
|
|
|
|
It should be obvious how to type ordinary
|
|
|
|
|
.SM ASCII
|
|
|
|
|
characters,
|
|
|
|
|
backspace, tab, escape, and newline.
|
|
|
|
|
In Plan 9, the key labeled
|
|
|
|
|
.B Return
|
|
|
|
|
or
|
|
|
|
|
.B Enter
|
|
|
|
|
generates a newline
|
|
|
|
|
.RB ( 0x0A );
|
|
|
|
|
if there is a key labeled
|
|
|
|
|
.B Line
|
|
|
|
|
.BR Feed ,
|
|
|
|
|
it generates a carriage return
|
|
|
|
|
.RB ( 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
|
|
|
|
|
.\" .B Caps
|
|
|
|
|
.\" .B Lock
|
|
|
|
|
.\" acts as an additional control key.
|
|
|
|
|
.\" .PP
|
|
|
|
|
.\" The delete character
|
|
|
|
|
.\" .RB ( 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
|
|
|
|
|
.\" .L *
|
|
|
|
|
.\" (not the asterisk above the 8).
|
|
|
|
|
.\" On the SLC and Sparcstation 2, delete is labeled
|
|
|
|
|
.\" .B Num
|
|
|
|
|
.\" .B Lock
|
|
|
|
|
.\" (the key above
|
|
|
|
|
.\" .B Backspace
|
|
|
|
|
.\" labeled
|
|
|
|
|
.\" .B Delete
|
|
|
|
|
.\" functions as an additional backspace key).
|
|
|
|
|
.\" On the other keyboards, the key labeled
|
|
|
|
|
.\" .B Del
|
|
|
|
|
.\" or
|
|
|
|
|
.\" .B Delete
|
|
|
|
|
.\" generates the delete character.
|
|
|
|
|
.PP
|
|
|
|
|
The down arrow,
|
|
|
|
|
used by
|
2020-08-16 00:07:38 +00:00
|
|
|
|
.MR 9term (1) ,
|
|
|
|
|
.MR acme (1) ,
|
2005-07-18 22:47:21 +00:00
|
|
|
|
and
|
2020-08-16 00:07:38 +00:00
|
|
|
|
.MR sam (1) ,
|
2005-07-18 22:47:21 +00:00
|
|
|
|
causes windows to scroll forward.
|
|
|
|
|
The up arrow scrolls backward.
|
|
|
|
|
.PP
|
|
|
|
|
Characters in Plan 9 are runes (see
|
2020-08-16 00:07:38 +00:00
|
|
|
|
.MR utf (7) ).
|
2020-05-30 01:19:32 +00:00
|
|
|
|
Any rune can be typed using a compose key followed by several
|
2005-07-18 22:47:21 +00:00
|
|
|
|
other keys.
|
|
|
|
|
The compose key is also generally near the lower right of the main key area:
|
|
|
|
|
the
|
|
|
|
|
.B NUM PAD
|
|
|
|
|
key on the Gnot, the
|
|
|
|
|
.B Alternate
|
|
|
|
|
key on the Next, the
|
|
|
|
|
.B Compose
|
|
|
|
|
key on the SLC, the
|
|
|
|
|
.B Option
|
|
|
|
|
key on the Magnum, and either
|
|
|
|
|
.B Alt
|
|
|
|
|
key on the PC.
|
2020-05-30 01:19:32 +00:00
|
|
|
|
To type a single rune with the value specified by
|
|
|
|
|
a given four-digit hexadecimal number,
|
|
|
|
|
type the compose key,
|
|
|
|
|
then a capital
|
|
|
|
|
.LR X ,
|
|
|
|
|
and then the four hexadecimal digits (decimal digits and
|
2005-07-18 22:47:21 +00:00
|
|
|
|
.L a
|
|
|
|
|
to
|
2020-05-30 01:19:32 +00:00
|
|
|
|
.LR f ).
|
|
|
|
|
For a longer rune, type
|
|
|
|
|
.L X
|
|
|
|
|
twice followed by five digits,
|
|
|
|
|
or type
|
|
|
|
|
.L X
|
|
|
|
|
three times followed by six digits.
|
2005-07-18 22:47:21 +00:00
|
|
|
|
There are shorthands for many characters, comprising
|
|
|
|
|
the compose key followed by a two- or three-character sequence.
|
|
|
|
|
The full list is too long to repeat here, but is contained in the file
|
|
|
|
|
.L \*9/lib/keyboard
|
|
|
|
|
in a format suitable for
|
2020-08-16 00:07:38 +00:00
|
|
|
|
.MR grep (1)
|
2005-07-18 22:47:21 +00:00
|
|
|
|
or
|
2020-08-16 00:07:38 +00:00
|
|
|
|
.MR look (1) .
|
2011-01-02 19:18:28 +00:00
|
|
|
|
To add a sequence, edit that file and then rebuild
|
2020-08-16 00:07:38 +00:00
|
|
|
|
.MR devdraw (1) .
|
2011-01-02 19:18:28 +00:00
|
|
|
|
.PP
|
|
|
|
|
There are several rules guiding the design of the sequences, as
|
|
|
|
|
illustrated by the following examples.
|
2005-07-18 22:47:21 +00:00
|
|
|
|
.IP
|
|
|
|
|
A repeated symbol gives a variant of that symbol, e.g.,
|
|
|
|
|
.B ??
|
|
|
|
|
yields ¿\|.
|
|
|
|
|
.IP
|
|
|
|
|
.SM ASCII
|
|
|
|
|
digraphs for mathematical operators give the corresponding operator, e.g.,
|
|
|
|
|
.B <=
|
|
|
|
|
yields ≤.
|
|
|
|
|
.IP
|
|
|
|
|
Two letters give the corresponding ligature, e.g.,
|
|
|
|
|
.B AE
|
|
|
|
|
yields Æ.
|
|
|
|
|
.IP
|
|
|
|
|
Mathematical and other symbols are given by abbreviations for their names, e.g.,
|
|
|
|
|
.B pg
|
|
|
|
|
yields ¶.
|
|
|
|
|
.IP
|
|
|
|
|
Chess pieces are given by a
|
|
|
|
|
.B w
|
|
|
|
|
or
|
|
|
|
|
.B b
|
|
|
|
|
followed by a letter for the piece
|
|
|
|
|
.RB ( k
|
|
|
|
|
for king,
|
|
|
|
|
.B q
|
|
|
|
|
for queen,
|
|
|
|
|
.B r
|
|
|
|
|
for rook,
|
|
|
|
|
.B n
|
|
|
|
|
for knight,
|
|
|
|
|
.B b
|
|
|
|
|
for bishop, or
|
|
|
|
|
.B p
|
|
|
|
|
for pawn),
|
|
|
|
|
e.g.,
|
|
|
|
|
.B wk
|
|
|
|
|
for a white king.
|
|
|
|
|
.IP
|
|
|
|
|
Greek letters are given by an asterisk followed by a corresponding latin letter,
|
|
|
|
|
e.g.,
|
|
|
|
|
.B *d
|
|
|
|
|
yields δ.
|
|
|
|
|
.IP
|
|
|
|
|
Cyrillic letters are given by an at sign followed by a corresponding latin letter or letters,
|
|
|
|
|
e.g.,
|
|
|
|
|
.B @ya
|
|
|
|
|
yields я.
|
|
|
|
|
.IP
|
|
|
|
|
Script letters are given by a dollar sign followed by the corresponding regular letter,
|
|
|
|
|
e.g.,
|
|
|
|
|
.B $F
|
|
|
|
|
yields ℱ.
|
|
|
|
|
.IP
|
|
|
|
|
A digraph of a symbol followed by a letter gives the letter with an accent that looks like the symbol, e.g.,
|
|
|
|
|
.B ,c
|
|
|
|
|
yields ç.
|
|
|
|
|
.IP
|
|
|
|
|
Two digits give the fraction with that numerator and denominator, e.g.,
|
|
|
|
|
.B 12
|
|
|
|
|
yields ½.
|
|
|
|
|
.IP
|
|
|
|
|
The letter s followed by a character gives that character as a superscript, e.g.,
|
|
|
|
|
.B s1
|
|
|
|
|
yields ⁱ.
|
|
|
|
|
These characters are taken from the Unicode block 0x2070; the 1, 2, and 3
|
|
|
|
|
superscripts in the Latin-1 block are available by using a capital S instead of s.
|
|
|
|
|
.IP
|
|
|
|
|
Sometimes a pair of characters give a symbol related to the superimposition of the characters, e.g.,
|
|
|
|
|
.B cO
|
|
|
|
|
yields ©.
|
|
|
|
|
.IP
|
|
|
|
|
A mnemonic letter followed by $ gives a currency symbol, e.g.,
|
|
|
|
|
.B l$
|
|
|
|
|
yields £.
|
|
|
|
|
.PP
|
|
|
|
|
Note the difference between ß (ss) and µ (micron) and
|
|
|
|
|
the Greek β and μ.
|
2011-01-02 20:39:09 +00:00
|
|
|
|
.SS "X WINDOWS
|
|
|
|
|
Under X Windows, both the Alt key and the ``Multi key''
|
|
|
|
|
can begin a compose sequence in a Plan 9 program.
|
|
|
|
|
.PP
|
|
|
|
|
It is also possible to configure X Windows to use the
|
|
|
|
|
same keystroke mappings as the Plan 9 programs.
|
|
|
|
|
First, generate an XCompose sequence list by using
|
|
|
|
|
.IR mklatinkbd :
|
|
|
|
|
.IP
|
|
|
|
|
.EX
|
|
|
|
|
mklatinkbd -x $PLAN9/lib/keyboard >$HOME/.XCompose
|
|
|
|
|
.EE
|
|
|
|
|
.LP
|
|
|
|
|
Second, configure a ``Multi key'' by running
|
|
|
|
|
.IP
|
|
|
|
|
.EX
|
|
|
|
|
xmodmap -e 'keysym Super_L = Multi_key'
|
|
|
|
|
.EE
|
|
|
|
|
.LP
|
|
|
|
|
(The name
|
|
|
|
|
.L Super_L
|
|
|
|
|
typically denotes the Windows key on recent keyboards.)
|
|
|
|
|
.PP
|
|
|
|
|
Third, set these environment variables so that GTK- and QT-based programs
|
|
|
|
|
will use the compose sequences:
|
|
|
|
|
.IP
|
|
|
|
|
.EX
|
|
|
|
|
export GTK_IM_MODULE=xim
|
|
|
|
|
export QT_IM_MODULE=xim
|
|
|
|
|
.EE
|
|
|
|
|
.LP
|
|
|
|
|
Finally, start a new GTK- or QT-based program:
|
|
|
|
|
.IP
|
|
|
|
|
.EX
|
|
|
|
|
gnome-terminal &
|
|
|
|
|
.EE
|
|
|
|
|
.LP
|
|
|
|
|
In that terminal, typing the key sequence
|
|
|
|
|
.RB ` Windows
|
|
|
|
|
.B *
|
|
|
|
|
.BR a '
|
|
|
|
|
should be interpreted as the Greek letter
|
|
|
|
|
.LR α .
|
|
|
|
|
.PP
|
|
|
|
|
If using the GNOME Window Manager, put the
|
|
|
|
|
.B xmodmap
|
|
|
|
|
and
|
|
|
|
|
.B export
|
|
|
|
|
commands into the file
|
|
|
|
|
.B $HOME/.gnomerc
|
|
|
|
|
to run them automatically at startup.
|
2005-07-18 22:47:21 +00:00
|
|
|
|
.SH FILES
|
|
|
|
|
.TP
|
|
|
|
|
.B \*9/lib/keyboard
|
|
|
|
|
sorted table of characters and keyboard sequences
|
|
|
|
|
.PD
|
|
|
|
|
.SH "SEE ALSO"
|
2020-08-16 00:07:38 +00:00
|
|
|
|
.MR intro (1) ,
|
|
|
|
|
.MR ascii (1) ,
|
|
|
|
|
.MR tcs (1) ,
|
|
|
|
|
.MR 9term (1) ,
|
|
|
|
|
.MR acme (1) ,
|
|
|
|
|
.MR sam (1) ,
|
|
|
|
|
.MR utf (7)
|