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 .IR 9term (1),
53 .IR acme (1),
54 and
55 .IR 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 .IR utf (7)).
61 Any 16-bit 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 After typing the compose key, type a capital
76 .L X
77 and exactly four hexadecimal characters (digits and
78 .L a
79 to
80 .LR f )
81 to type a single rune with the value represented by
82 the typed number.
83 There are shorthands for many characters, comprising
84 the compose key followed by a two- or three-character sequence.
85 The full list is too long to repeat here, but is contained in the file
86 .L \*9/lib/keyboard
87 in a format suitable for
88 .IR grep (1)
89 or
90 .IR look (1).
91 To add a sequence, edit that file and then rebuild
92 .IR devdraw (1).
93 .PP
94 There are several rules guiding the design of the sequences, as
95 illustrated by the following examples.
96 .IP
97 A repeated symbol gives a variant of that symbol, e.g.,
98 .B ??
99 yields ¿\|.
100 .IP
101 .SM ASCII
102 digraphs for mathematical operators give the corresponding operator, e.g.,
103 .B <=
104 yields ≤.
105 .IP
106 Two letters give the corresponding ligature, e.g.,
107 .B AE
108 yields Æ.
109 .IP
110 Mathematical and other symbols are given by abbreviations for their names, e.g.,
111 .B pg
112 yields ¶.
113 .IP
114 Chess pieces are given by a
115 .B w
116 or
117 .B b
118 followed by a letter for the piece
119 .RB ( k
120 for king,
121 .B q
122 for queen,
123 .B r
124 for rook,
125 .B n
126 for knight,
127 .B b
128 for bishop, or
129 .B p
130 for pawn),
131 e.g.,
132 .B wk
133 for a white king.
134 .IP
135 Greek letters are given by an asterisk followed by a corresponding latin letter,
136 e.g.,
137 .B *d
138 yields δ.
139 .IP
140 Cyrillic letters are given by an at sign followed by a corresponding latin letter or letters,
141 e.g.,
142 .B @ya
143 yields я.
144 .IP
145 Script letters are given by a dollar sign followed by the corresponding regular letter,
146 e.g.,
147 .B $F
148 yields ℱ.
149 .IP
150 A digraph of a symbol followed by a letter gives the letter with an accent that looks like the symbol, e.g.,
151 .B ,c
152 yields ç.
153 .IP
154 Two digits give the fraction with that numerator and denominator, e.g.,
155 .B 12
156 yields ½.
157 .IP
158 The letter s followed by a character gives that character as a superscript, e.g.,
159 .B s1
160 yields ⁱ.
161 These characters are taken from the Unicode block 0x2070; the 1, 2, and 3
162 superscripts in the Latin-1 block are available by using a capital S instead of s.
163 .IP
164 Sometimes a pair of characters give a symbol related to the superimposition of the characters, e.g.,
165 .B cO
166 yields ©.
167 .IP
168 A mnemonic letter followed by $ gives a currency symbol, e.g.,
169 .B l$
170 yields £.
171 .PP
172 Note the difference between ß (ss) and µ (micron) and
173 the Greek β and μ.
174 .SS "X WINDOWS
175 Under X Windows, both the Alt key and the ``Multi key''
176 can begin a compose sequence in a Plan 9 program.
177 .PP
178 It is also possible to configure X Windows to use the
179 same keystroke mappings as the Plan 9 programs.
180 First, generate an XCompose sequence list by using
181 .IR mklatinkbd :
182 .IP
183 .EX
184 mklatinkbd -x $PLAN9/lib/keyboard >$HOME/.XCompose
185 .EE
186 .LP
187 Second, configure a ``Multi key'' by running
188 .IP
189 .EX
190 xmodmap -e 'keysym Super_L = Multi_key'
191 .EE
192 .LP
193 (The name
194 .L Super_L
195 typically denotes the Windows key on recent keyboards.)
196 .PP
197 Third, set these environment variables so that GTK- and QT-based programs
198 will use the compose sequences:
199 .IP
200 .EX
201 export GTK_IM_MODULE=xim
202 export QT_IM_MODULE=xim
203 .EE
204 .LP
205 Finally, start a new GTK- or QT-based program:
206 .IP
207 .EX
208 gnome-terminal &
209 .EE
210 .LP
211 In that terminal, typing the key sequence
212 .RB ` Windows
213 .B *
214 .BR a '
215 should be interpreted as the Greek letter
216 .LR α .
217 .PP
218 If using the GNOME Window Manager, put the
219 .B xmodmap
220 and
221 .B export
222 commands into the file
223 .B $HOME/.gnomerc
224 to run them automatically at startup.
225 .SH FILES
226 .TP
227 .B \*9/lib/keyboard
228 sorted table of characters and keyboard sequences
229 .PD
230 .SH "SEE ALSO"
231 .IR intro (1),
232 .IR ascii (1),
233 .IR tcs (1),
234 .IR 9term (1),
235 .IR acme (1),
236 .IR sam (1),
237 .IR utf (7)