3 kbdfs \- keyboard and console filesystem
19 .B mount -b /srv/cons /dev
31 translates raw keyboard scancodes from
37 file and optionaly reads console input from
39 to provide initial keyboard and console input.
41 It serves a one-level directory containing the files
51 flag enables a debug trace of
57 from making its memory private.
63 to post its channel on
84 file returns characters typed on the console. Normally, characters
85 are buffered to enable erase and kill processing. A control-U,
89 the current input line (removes all
90 characters from the buffer of characters not yet read via cons), and a
93 the previous non-kill, non-erase character from the
94 input buffer. Killing and erasing only delete characters back to, but
95 not including, the last newline. Characters typed at the keyboard
96 actually produce 16-bit runes (see
98 but the runes are translated into the variable-length
102 before putting them into the buffer. A
104 of a length greater than zero causes the process to wait until a newline
107 ends the buffer, and then returns as much of the buffer as the
108 argument to read allows, but only up to one complete line. A
111 is not put into the buffer. If part of the line remains, the next
112 read will return bytes from that remainder and not part of any new
113 line that has been typed since.
117 has been written to the
124 characters are not echoed as they are typed,
129 are not treated specially, and characters are
130 available to read as soon as they are typed. Ordinary mode is
135 or this file is closed.
141 causes the characters to be printed on the console screen.
147 as its last argument, it reads and processes the
148 characters from that file and forwards them to the
150 file with the same text processing applied as on keyboard input.
151 This is used on serial consoles.
155 file returns the character
160 followed by a null terminated, variable-length,
164 message is send when a key is pressed down
167 when a key is released. The following string contains all the keycodes
168 of the keys that are currently pressed down in decomposed form.
169 This includes all keys that have a keyboard mapping and modifier keys.
170 Some keys may produce multiple characters like
178 in the string. The string following the
180 message contains the single character that would have been appeared
185 message will be resent at the keyboard repeat rate.
188 will return a single message or block until there are new messages
189 available. Opening the
191 file disables input processing on the
193 file until it is closed again.
195 Raw scancodes can be written to the
197 file for external keyboard input (used for USB keyboards).
199 Scancodes are maped to Unicode characters with a number of
200 translation tables. These tables can be accessed with the
204 Reads return the current contents of the map.
205 Each entry is one line containing three 11 character numeric fields,
206 each followed by a space:
207 a table number, an index into the table (scan code), and the decimal value
208 of the corresponding Unicode character (0 if none).
209 The table numbers are platform dependent; they typically distinguish
210 between unshifted and shifted keys.
211 The scan code values are hardware dependent and can vary
212 from keyboard to keyboard.
214 Writes to the file change the map.
215 Lines written to the file must contain three space-separated fields,
216 representing the table number, scan code index, and Unicode character.
217 Values are taken to be decimal unless they start with
222 The Unicode character can also be represented as
226 gives the UTF-8 representation of the character
231 to represent a control character.
240 .B /sys/src/cmd/aux/kbdfs