[net.micro.mac] Customizing MacTerminal

lsr@apple.UUCP (Larry Rosenstein) (12/04/84)

After all the complaints about the MacTerminal keyboard, I feel compelled
to post this message.

The mapping between keycaps and Ascii characters is totally defined in
resource files (of course)!  Because of the way resources are found, it is
possible to setup the keyboard mapping on a document-by-document basis,
which is much better than have multiple copies of MacTerminal around.

There are 3 resource types to consider.  (In the following, I describe the
contents of the resource in terms of a Pascal declaration.)

(1) Type KCKI: PACKED ARRAY[KeyCode] OF KeyIndex,
               where KeyCode = 0..95 and KeyIndex = 1..71.
This maps the standard keycode numbers into the range 1..71.

(2) Type KICH: ARRAY[KeyIndex] OF Entry,
               where Entry = PACKED ARRAY[0..15] OF CHAR.
This maps the KeyIndex and the state of the modifier keys into an Ascii
character.  (The modifier bits are in the same order as in the
EventRecord.)

(3) Type CHRT: PACKED ARRAY[Boolean, Char] OF Boolean.
This maps the state of the command key and the Ascii character (from (2))
into TRUE if repeating is allowed for that key if the Repeat Ctrls options
if off.  (I am not 100% sure about this, however.)

There are 2 resources of each type; ID = 256 is for VT100/TTY mode and ID =
257 if for IBM mode.

I was able to customize one of my documents by using RMover to copy the
appropriate resources into the document, and using FEdit to modify them.

NOTE: I believe this information is accurate, but I have not verified this
with the MacTerminal authors.  (So don't blame them or Apple if something
goes wrong, blame me.)

Good Luck, and Enjoy!

Larry Rosenstein

CSNET: lsr%Apple@CSNET-RELAY
UUCP: {nsc, dual, idi, voder}!apple!lsr

P.S. I was deeply hurt to see that some people did not trust Apple to do
the RIGHT thing, at least once. :-)

ward@hao.UUCP (Mike Ward) (12/06/84)

> P.S. I was deeply hurt to see that some people did not trust Apple to do
> the RIGHT thing, at least once. :-)

Apple has, so far, done the RIGHT thing exactly once: they created
the Mac.  So far, there has been no evidence that they will ever
do anything worthwhile again.

-- 
"The number of arguments is unimportant unless some of them are correct."

Michael Ward, NCAR/SCD
UUCP: {hplabs,nbires,brl-bmd,seismo,menlo70,stcvax}!hao!ward
ARPA: hplabs!hao!sa!ward@Berkeley
BELL: 303-497-1252
USPS: POB 3000, Boulder, CO  80307