Blob


1 .TH KEYBOARD 7
2 .SH NAME
3 keyboard \- how to type characters
4 .SH DESCRIPTION
5 Keyboards are idiosyncratic.
6 It should be obvious how to type ordinary
7 .SM ASCII
8 characters,
9 backspace, tab, escape, and newline.
10 In Plan 9, the key labeled
11 .B Return
12 or
13 .B Enter
14 generates a newline
15 .RB ( 0x0A );
16 if there is a key labeled
17 .B Line
18 .BR Feed ,
19 it generates a carriage return
20 .RB ( 0x0D );
21 Plan 9 eschews CRLFs.
22 All control characters are typed in the usual way;
23 in particular, control-J is a line feed and control-M a carriage return.
24 .\" On the PC and some other machines, the key labeled
25 .\" .B Caps
26 .\" .B Lock
27 .\" acts as an additional control key.
28 .\" .PP
29 .\" The delete character
30 .\" .RB ( 0x7F )
31 .\" may be generated by a different key,
32 .\" one near the extreme upper right of the keyboard.
33 .\" On the Next, it is the key labeled
34 .\" .L *
35 .\" (not the asterisk above the 8).
36 .\" On the SLC and Sparcstation 2, delete is labeled
37 .\" .B Num
38 .\" .B Lock
39 .\" (the key above
40 .\" .B Backspace
41 .\" labeled
42 .\" .B Delete
43 .\" functions as an additional backspace key).
44 .\" On the other keyboards, the key labeled
45 .\" .B Del
46 .\" or
47 .\" .B Delete
48 .\" generates the delete character.
49 .PP
50 The down arrow,
51 used by
52 .MR 9term (1) ,
53 .MR acme (1) ,
54 and
55 .MR sam (1) ,
56 causes windows to scroll forward.
57 The up arrow scrolls backward.
58 .PP
59 Characters in Plan 9 are runes (see
60 .MR utf (7) ).
61 Any rune can be typed using a compose key followed by several
62 other keys.
63 The compose key is also generally near the lower right of the main key area:
64 the
65 .B NUM PAD
66 key on the Gnot, the
67 .B Alternate
68 key on the Next, the
69 .B Compose
70 key on the SLC, the
71 .B Option
72 key on the Magnum, and either
73 .B Alt
74 key on the PC.
75 To type a single rune with the value specified by
76 a given four-digit hexadecimal number,
77 type the compose key,
78 then a capital
79 .LR X ,
80 and then the four hexadecimal digits (decimal digits and
81 .L a
82 to
83 .LR f ).
84 For a longer rune, type
85 .L X
86 twice followed by five digits,
87 or type
88 .L X
89 three times followed by six digits.
90 There are shorthands for many characters, comprising
91 the compose key followed by a two- or three-character sequence.
92 The full list is too long to repeat here, but is contained in the file
93 .L \*9/lib/keyboard
94 in a format suitable for
95 .MR grep (1)
96 or
97 .MR look (1) .
98 To add a sequence, edit that file and then rebuild
99 .MR devdraw (1) .
100 .PP
101 There are several rules guiding the design of the sequences, as
102 illustrated by the following examples.
103 .IP
104 A repeated symbol gives a variant of that symbol, e.g.,
105 .B ??
106 yields ¿\|.
107 .IP
108 .SM ASCII
109 digraphs for mathematical operators give the corresponding operator, e.g.,
110 .B <=
111 yields ≤.
112 .IP
113 Two letters give the corresponding ligature, e.g.,
114 .B AE
115 yields Æ.
116 .IP
117 Mathematical and other symbols are given by abbreviations for their names, e.g.,
118 .B pg
119 yields ¶.
120 .IP
121 Chess pieces are given by a
122 .B w
123 or
124 .B b
125 followed by a letter for the piece
126 .RB ( k
127 for king,
128 .B q
129 for queen,
130 .B r
131 for rook,
132 .B n
133 for knight,
134 .B b
135 for bishop, or
136 .B p
137 for pawn),
138 e.g.,
139 .B wk
140 for a white king.
141 .IP
142 Greek letters are given by an asterisk followed by a corresponding latin letter,
143 e.g.,
144 .B *d
145 yields δ.
146 .IP
147 Cyrillic letters are given by an at sign followed by a corresponding latin letter or letters,
148 e.g.,
149 .B @ya
150 yields я.
151 .IP
152 Script letters are given by a dollar sign followed by the corresponding regular letter,
153 e.g.,
154 .B $F
155 yields ℱ.
156 .IP
157 A digraph of a symbol followed by a letter gives the letter with an accent that looks like the symbol, e.g.,
158 .B ,c
159 yields ç.
160 .IP
161 Two digits give the fraction with that numerator and denominator, e.g.,
162 .B 12
163 yields ½.
164 .IP
165 The letter s followed by a character gives that character as a superscript, e.g.,
166 .B s1
167 yields ⁱ.
168 These characters are taken from the Unicode block 0x2070; the 1, 2, and 3
169 superscripts in the Latin-1 block are available by using a capital S instead of s.
170 .IP
171 Sometimes a pair of characters give a symbol related to the superimposition of the characters, e.g.,
172 .B cO
173 yields ©.
174 .IP
175 A mnemonic letter followed by $ gives a currency symbol, e.g.,
176 .B l$
177 yields £.
178 .PP
179 Note the difference between ß (ss) and µ (micron) and
180 the Greek β and μ.
181 .SS "X WINDOWS
182 Under X Windows, both the Alt key and the ``Multi key''
183 can begin a compose sequence in a Plan 9 program.
184 .PP
185 It is also possible to configure X Windows to use the
186 same keystroke mappings as the Plan 9 programs.
187 First, generate an XCompose sequence list by using
188 .IR mklatinkbd :
189 .IP
190 .EX
191 mklatinkbd -x $PLAN9/lib/keyboard >$HOME/.XCompose
192 .EE
193 .LP
194 Second, configure a ``Multi key'' by running
195 .IP
196 .EX
197 xmodmap -e 'keysym Super_L = Multi_key'
198 .EE
199 .LP
200 (The name
201 .L Super_L
202 typically denotes the Windows key on recent keyboards.)
203 .PP
204 Third, set these environment variables so that GTK- and QT-based programs
205 will use the compose sequences:
206 .IP
207 .EX
208 export GTK_IM_MODULE=xim
209 export QT_IM_MODULE=xim
210 .EE
211 .LP
212 Finally, start a new GTK- or QT-based program:
213 .IP
214 .EX
215 gnome-terminal &
216 .EE
217 .LP
218 In that terminal, typing the key sequence
219 .RB ` Windows
220 .B *
221 .BR a '
222 should be interpreted as the Greek letter
223 .LR α .
224 .PP
225 If using the GNOME Window Manager, put the
226 .B xmodmap
227 and
228 .B export
229 commands into the file
230 .B $HOME/.gnomerc
231 to run them automatically at startup.
232 .SH FILES
233 .TP
234 .B \*9/lib/keyboard
235 sorted table of characters and keyboard sequences
236 .PD
237 .SH "SEE ALSO"
238 .MR intro (1) ,
239 .MR ascii (1) ,
240 .MR tcs (1) ,
241 .MR 9term (1) ,
242 .MR acme (1) ,
243 .MR sam (1) ,
244 .MR utf (7)