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