1 2 3 mapchan(8) 06 January 1993 mapchan(8) 4 5 6 _N_A_M_E 7 8 mapchan - format of tty device mapping files 9 10 _D_E_S_C_R_I_P_T_I_O_N 11 12 mmaappcchhaann configures the mapping of information input and output. 13 14 Each unique cchhaannnneell map requires a multiple of 1024 bytes (a 1K buffer) 15 for mapping the input and output of characters. No buffers are required 16 if no cchhaannnneellss are mapped. If control sequences are specified, an addi- 17 tional 1K buffer is required. 18 19 A method of sharing maps is implemented for cchhaannnneellss that have the same 20 map in place. Each additional, unique map allocates an additional buffer. 21 The maximum number of map buffers available on a system is configured in 22 the kernel, and is adjustable via the link kit NNEEMMAAPP parameter (see ccoonn-- 23 ffiigguurree(ADM)). Buffers of maps no longer in use are returned for use by 24 other maps. 25 26 _E_x_a_m_p_l_e _o_f _a _m_a_p _f_i_l_e 27 28 The internal character set is defined by the right column of the input 29 map, and the first column of the output map in place on that line. The 30 default internal character set is the 8-bit ISO 8859/1 character set, 31 which is also known as dpANS X3.4.2 and ISO/TC97/SC2. It supports the 32 Latin alphabet and can represent most European languages. 33 34 Any character value not given is assumed to be a straight mapping: only 35 the differences are shown in the _mm_aa_pp_ff_ii_ll_ee. The left-hand columns must be 36 unique. More than one occurrence of any entry is an error. Right-hand 37 column characters can appear more than once. This is ``many to one'' map- 38 ping. Nulls can be produced with compose sequences or as part of an out- 39 put string. 40 41 It is recommended that no mapping be enabled on the cchhaannnneell used to cre- 42 ate or modify the mapping files. This prevents any confusion of the 43 actual values being entered due to mapping. It is also recommended that 44 numeric rather than character representations be used in most cases, as 45 these are not likely to be subject to mapping. Use comments to identify 46 the characters represented. Refer to the aasscciiii(M) manual page and the 47 hardware reference manual for the device being mapped for the values to 48 assign. 49 50 # 51 # sharp/pound/cross-hatch is the comment character 52 # however, a quoted # ('#') is 0x23, not a comment 53 # 54 # beep, input, output, dead, compose and 55 # control are special keywords and should appear as shown. 56 # 57 beep # sound the bell when errors occur 58 input 59 60 'a' 'b' 61 'c' 'd' 62 63 dead 'p' 64 'q' 'r' # p followed by q yields r 65 's' 't' # p followed by s yields t 66 67 dead 'u' 68 'v' 'w' # u followed by v yields w 69 70 compose 'xx' # xx is the compose key (only one allowed) 71 'y' 'z' 'A' # x followed by y and z yields A 72 'B' 'C' 'D' # x followed by B and C yields D 73 74 output 75 'e' 'f' # e is mapped to f 76 'g' 'h' 'i' 106 # g is mapped to h i j - one to many 77 'k' 0x6c 0155 'n' # k is mapped to l m n 78 79 control # the control sections must be last 80 81 input 82 E 1 # the character E is followed by 83 # 1 more unmapped character 84 85 output 86 FG 2 # the characters F G are followed by 87 # 2 more unmapped characters 88 89 All of the single letters above preceding the ``control'' section must be 90 in one of these formats: 91 92 'j' # quoted character 93 106 # decimal value 94 0x6a # hexadecimal value 95 0152 # octal value 96 97 All of the above formats are translated to single byte values. 98 99 The _c_o_n_t_r_o_l sections (which must be the last in the file) contain speci- 100 fications of character sequences which should be passed through to or 101 from the terminal device without going through the normal mmaappcchhaann pro- 102 cessing. These specifications consist of two parts: a fixed sequence of 103 one or more defined characters indicating the start of a no-map sequence, 104 followed by a number of characters of which the actual values are 105 unspecified. 106 107 To illustrate this, consider a cursor-control sequence which should be 108 passed directly to the terminal without being mapped. Such a sequence 109 would typically begin with a fixed escape sequence instructing the termi- 110 nal to interpret the following two characters as a cursor position; the 111 values of the following two characters are variable, and depend on the 112 cursor position requested. Such a control sequence would be specified 113 as: 114 115 \E= 2 # Cursor control: escape = <x> <y> 116 117 There are two subsections under _c_o_n_t_r_o_l: the _i_n_p_u_t section is used to 118 filter data sent from the terminal to UNIX, and the _o_u_t_p_u_t section is 119 used to filter data sent from UNIX to the terminal. The two fields in 120 each control sequence are separated by white space, that is the Space or 121 Tab characters. Also the ``#'' (number sign) character introduces a com- 122 ment, causing the remainder of the line to be ignored. Therefore, if any 123 of these three characters are required in the specification itself, they 124 should be entered using one of alternative means of entering characters, 125 as follows: 126 127 ^xx The character produced by the terminal on pressing the 128 <Ctrl> and <x> keys together. 129 130 \E or \e The <Esc> character, octal 033. 131 132 \_cc Where _cc is one of b, f, l, n, r or t, produces Backspace, 133 Formfeed, Linefeed, Newline, Carriage Return, or Tab char- 134 acters respectively. 135 136 \0 Since the NULL character can not be represented, this 137 sequence is stored as the character with octal value 0200, 138 which behaves as a NULL on most terminals. 139 140 \nnnn or \nnnnnn Specifies the octal value of the character directly. 141 142 \ followed by any other character is interpreted as that 143 character. This can be used to enter Space, Tab, or Hash 144 characters. 145 146 _D_I_A_G_N_O_S_T_I_C_S 147 148 mmaappcchhaann performs these error checks when processing the mapfile: 149 150 + More than one compose key. 151 152 + Characters mapped to more than one value. 153 154 + Syntax errors in the byte values. 155 156 + Missing input or output keywords. 157 158 + Dead or compose keys also occurring in the input section. 159 160 + Extra information on a line. 161 162 + Mapping a character to null. 163 164 + Starting an output control sequence with a character that is already 165 mapped. 166 167 If characters are displayed as the 7-bit value instead of the 8-bit 168 value, use ssttttyy --aa to verify that --iissttrriipp is set. Make sure _i_n_p_u_t is 169 mapping to the 8859 character set, _o_u_t_p_u_t is mapping from the 8859 to the 170 device display character set. _d_e_a_d and _c_o_m_p_o_s_e sequences are _i_n_p_u_t map- 171 ping and should be going to 8859. 172 173 _W_A_R_N_I_N_G 174 175 Use of mapping files that specify a different ``internal'' character set 176 per-channel, or a set other than the 8-bit ISO 8859 set supplied by 177 default can cause strange side effects. It is especially important to 178 retain the 7-bit ASCII portion of the character set (see aasscciiii(M)). UNIX 179 utilities and applications assume these values. Media transported 180 between machines with different internal code set mappings may not be 181 portable as no mapping is performed on block devices, such as tape and 182 floppy drives. ttrrcchhaann can be used to ``translate'' from one internal 183 character set to another. 184 185 Do not set IISSTTRRIIPP (see ssttttyy(C)) on channels that have mapping that 186 includes 8-bit characters. 187 188 _L_I_M_I_T_A_T_I_O_N_S 189 190 Some non-U.S. keyboards and display devices do not support characters 191 commonly used by UNIX command shells and the C programming language. Do 192 not attempt to use such devices for system administration tasks. 193 194 Not all terminals or printers can display all the characters that can be 195 represented using this utility. Refer to the device's hardware manual for 196 information on the capabilities of the peripheral device. 197 198 _F_I_L_E_S 199 200 /_u_s_r/_l_o_c_a_l/_e_t_c/_m_a_p_c_h_a_n/_d_e_f_a_u_l_t 201 /_u_s_r/_l_o_c_a_l/_e_t_c/_m_a_p_c_h_a_n/*._m_a_p 202 203 _S_E_E _A_L_S_O 204 205 aasscciiii(7), kkeeyybbooaarrdd(4), llpp(1), ssccrreeeenn(4), ttttyy(1) 206 207 _S_T_A_N_D_A_R_D_S 208 209 mmaappcchhaann is not part of any currently supported standard; it is an exten- 210 sion of AT&T System V provided by The Santa Cruz Operation, Inc. 211