Aaxl reads a description of keynames and corresponding attributes and a text to program the key with. Several files may be given as arguments. With no files specified, $HOME/.aaxlrc is read. A filename of - reads from stdin.
The -a flag is used to append the downloaded strings to the current state. If not given, programmable strings are cleared before defining any new string.
The -d flag is a debug flag, causing Ann Arbor XL memory usage statistics to be printed instead of loading the programmable strings. An absolute bytecount, and the percentage of programmable strings memory that would be used, is printed.
The -l flag asks for the key programming lock to be set, after the programmable strings have been loaded.
The -v flag asks the program to be verbose and print the body of the control string it would send to the Ann Arbor, to stdout. The entire control string is still written out, unless -d is used.
The program collects definitions of programmable keys from the files it reads. The definitions are wrapped in preamble and postamble control sequences, and send to stdout. Other simultaneous output to the terminal will probably corrupt the programming command, though it is written using a single (hopefully atomic) output operation.
As a side benefit, to initialize the programmable strings on the XL, use
aaxl /dev/null
Each input contains lines specifying a key to upload a programmable string for. Lines starting with #, and empty lines, are ignored. The format of each line is
name <whitespace> options [ <whitespace> <tab> text ]
where <whitespace> is blanks, tabs, and commas. The text is optional, if not there the key will revert to default programmed text (usually none). This can be used to change other behavior of a key.
The options field consists of keywords from the following lists:
ctrl, shift, ctrl-shift, meta, 0-31, 64 - shift level host, display, graphics - transmit direction never, always - repeat attribute level - this is a shift key normal - everything normal
The defaults for all but the 'normal' keyword are whatever the previous option value was for the previous key. The normal (and initial default) values correspond to all-zero parameters. See the XL manual for detailed explanation of the options.
The text field follows one or more blanks or tabs after the option field and consists of everything from there till a newline. The string may contain all the usual C string escapes (\###, \n\t\s\a\b\f\r\e), and in addition may contain one sequence like \`...` where ... is a command to be executed by the shell. The result (stdout) of the command is interpolated in place of the \` escape.
Key names used in the first field correspond to the legend on the caps. Keys in the keypad group have a capital P appended to the cap name. The following list shows the complete list of recognized names. Note that key names which start with a capital letter do not correspond to a keyboard key, but rahter to other capabilities of the XL. For example, DA programs the answerback string (Device Attributes), Power-on the power-on string, etc.
s1 s2 space s3 s4 s5 s6 pause shift-l z x c v b n m , . / shift-r scroll zoom ctrl a s d f g h j k l ; ' return back-space tab q w e r t y u i o p [ ] line-feed del esc 1 2 3 4 5 6 7 8 9 0 - = ` \ break 0P 00P .P enter ,P 1P 2P 3P tabP 4P 5P 6P +P 7P 8P 9P -P reset setup f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 f13 f14 f15 f16 f17 f18 send erase edit delete insert print Header Trailer ENQ DA Power-on
This program reports errors, including XL memory overflow that could occur. All errors are fatal. The program doesn't send an upload string to the terminal unless no errors were detected at all. Memory allocation for the upload string is done dynamically in the program, so excessively large string sequences are handled. Space-optimal output is produced.
When no file arguments are given to the program, the value of the HOME environment variable is assumed to be a directory containing a .aaxlrc file, which will be read if it exists.
Probably doesn't handle NUL's in strings terribly gracefully. Who does.