Trailing-Edge
-
PDP-10 Archives
-
mit_emacs_170_teco_1220
-
info/teach-c100.info
There are no other files named teach-c100.info in the archive.
-*- Mode:Text -*-
Node: Top, Next: Sample, Up: (EMACS INFO)Top
TEACH-C100 is an EMACS library that helps you to define
character sequences for the Concept-100 terminal's function keys.
For example, you could have the "F1" key defined to send the
sequence Altmode X T o p Space L e v e l Return, so that when you
type the F1 key, it has EMACS execute the M-X Top Level command.
Another possibility, showing that you can do things you can't do
with keyboard macros, for example, is a sequence that only takes
you half-way through a command: Altmode X L i s t Space, leaving
you to type the rest of the M-X List... command.
Also, note that keys may be defined for use outside EMACS,
e.g. for commonly used sequences typed to the EXEC, whole
commands or common parts of them, such as filenames.
Key sequences do not have to be sent to the host computer --
they may be defined to execute in the terminal, for instance, to
set certain terminal modes. [I don't have a Concept-100 manual
handy as of this writing, so I cannot provide an example. A
typical kind of thing might be to turn key-click on or off.
--ECC, 28 May 1982.]
Doing a M-X List LibraryTEACH-C100<return> will list the few
commands the the TEACH-C100 library. Basically, you first write
a (readable) source file; you then compile this into a
(essentially unreadable) file containing the exact sequence of
characters to send to the Concept-100 in order to define the
function keys; and you also need to insert some code into your
init file or EVARS file that will actually do the sending of the
definition sequence to the terminal. The commands you will find
in TEACH-C100 and should describe for further details are:
Insert Teach-C100 Teco Commands
Make C100 Key Definition File
Show C100 Keys
One thing you have to be careful about is exhausting the
Concept-100's local memory. (Different terminals may have
different amounts of it.) This can result in very peculiar
behavior. Therefore, when you compile the key-definition source
file, check the message it prints telling you how much local
memory will be used -- compare this to the amount your terminal
actually has.
* Menu:
* Sample:: An simple, sample source file.
* Syntax:: A description of the source file syntax, with
examples of various constructs.
Node: Sample, Next: Syntax, Up: Top
The text below defines the Concept-100 keys so that:
The INSRT key sends "X Insert % Count<return>" to EMACS (or
to any program, really, though EMACS is probably the only one
for which it makes any sense);
The F1 key sends "<MyHomeDirectory>"; and
The F2 key locally executes the sequence "????", which will
stand for whatever sequence it is that turns key-click off.
The format is based on InterLisp expressions, but you don't need
to have ever known InterLisp to use this library -- the syntax is
very simple. Basically commands are surrounded by parentheses,
strings of characters are surrounded by double-quote characters,
e.g. "this is a string", and any `%' or `"' characters are quote
with a `%' character. Comments are inside (* ... ). The next
info node explains the syntax in more detail.
The sample source file follows:
(* This is a comment. It can go for several lines, as this one
does. Any parenthese within it (such as here) should be
balanced.)
(* Define INSRT to send a sequence. Notice that to get one
percentage character sent to the computer, we must double it
here since it is the quote character.)
(Transmit INSRT "X Insert %% Count
")
(* Define the F1 key: )
(Transmit F1 "<MyHomeDirectory>")
(* Define F2 to execute something locally: )
(Local F2 "????")
Node: Syntax, Up: Top
The format is based on InterLisp expressions, but you don't
need to have ever known InterLisp to use this library -- the
syntax is very simple. Basically commands are surrounded by
parentheses, strings of characters are surrounded by double-quote
characters, and any `%' or `"' characters are quote with a `%'
character. Comments are inside a (* ... ) form.
For convenience inside strings, the two-character sequence
Return Linefeed will be translated to just a Return. This is so
that you can easily have definitions, such as M-X commands, that
end with or include a Return -- but not a Linefeed. If you
actually want a Linefeed to follow a Return, you can either quote
it, as in Return % Linefeed (three characters) or else use the
sequence Return Linefeed Linefeed. (The first two become just
Return, but the second Linefeed is kept.)
There are three kinds of commands:
(TRANSMIT <keyname> <string>)
This will define the key <keyname> to send the sequence
<string> to the computer. The keynames are just as they are
printed on the Concept-100 keys; they are also listed below.
Some examples:
(Transmit F1 "a string")
(Transmit DEL-CHAR "")
(Transmit SHIFT-F3 "a string with a ""%%"" in it")
Note that the string SHIFT-F3 sends is:
a string with a "%" in it
(Transmit F2 "1
2")
Note that the sequence F2 sends is 1 Return 2.
(Transmit F3 "1
2")
That will send the sequence 1 Return Linefeed 2.
(Transmit F4 "1
2")
So will that.
(LOCAL <keyname> <string>)
This will define the key <keyname> to execute the sequence
<string> localling within the terminal. For example, this might
complement between normal and reverse-video modes, or turn
key-click on or off. [I don't have any specific examples I can
include here, but the syntax is just like that of Transmit.]
(QUOTE <string>)
This causes the sequence <string> to be sent to the terminal,
along with any key definitions. This allows you to put the
terminal into particular modes, such as reverse-video or
key-click-off. You can do this by the LOCAL command, but that
only defines a KEY to execute that string -- using QUOTE will
cause EMACS to automatically send that string when it starts up.
Thus, if you always want key-click-off, use QUOTE. If you want
to have keys to turn it off and on, use LOCAL. (Or have both.)
Whitespace (spaces, tabs, blank lines) between commands are
ignored. Thus, for example, commands or comments could be
indented, or separated by blank lines, for visual clarity.
Note that the maximum length of a <string> is 95, a
Concept-100 limitation.
Any of the command names or key names may be upper-case,
lower-case, or mixed-case.
The defined key names are:
INSRT SHIFT-INSRT
DEL-CHAR SHIFT-DEL-CHAR
DEL-LINE-INS SHIFT-DEL-LINE-INS
EOP-CLEAR-EOL SHIFT-EOP-CLEAR-EOL
SEND SHIFT-SEND
F1 SHIFT-F1
F2 SHIFT-F2
F3 SHIFT-F3
F4 SHIFT-F4
F5 SHIFT-F5
F6 SHIFT-F6
F7 SHIFT-F7
F8 SHIFT-F8
F9 SHIFT-F9
F10 SHIFT-F10
F11 SHIFT-F11
F12 SHIFT-F12
F13 SHIFT-F13
F14 SHIFT-F14