home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / old / ckermit4e / ckm834.doc < prev    next >
Text File  |  2020-01-01  |  39KB  |  776 lines

  1.  
  2.  
  3.  
  4. 1. MACINTOSH KERMIT
  5.  
  6. Program:        Bill   Catchings,   Bill   Schilit,  Frank  da  Cruz  (Columbia
  7.                 University),
  8.                 Davide Cervone, University of Rochester
  9. Language:       C (SUMACC)
  10. Documentation:  Frank da Cruz, Bill Schilit
  11. Version:        0.8(34)
  12. Date:           March, 1986
  13.  
  14. Macintosh Kermit, or "MacKermit", is an implemtation of the Kermit file  trans-
  15. fer  protocol for the Apple Macintosh (and Macintosh-XL) computer, developed at
  16. Columbia University, based on C-Kermit (which also forms the  nucleus  of  Unix
  17. Kermit).
  18.  
  19.  
  20. MacKermit Capabilities At A Glance:
  21.  
  22.   Local operation:                   Yes
  23.   Remote operation:                  Yes (server mode only)
  24.   Login scripts:                     No
  25.   Transfer text files:               Yes
  26.   Transfer binary files:             Yes
  27.   Wildcard send:                     No
  28.   File transfer interruption:        Yes
  29.   Filename collision avoidance:      Yes
  30.   Can time out:                      Yes
  31.   8th-bit prefixing:                 Yes
  32.   Repeat count prefixing:            Yes
  33.   Alternate block checks:            Yes
  34.   Terminal emulation:                Yes (VT100,VT102)
  35.   Communication settings:            Yes
  36.   Transmit BREAK:                    Yes
  37.   Support for dialout modems:        No
  38.   IBM mainframe communication:       Yes
  39.   Transaction logging:               No
  40.   Session logging:                   No
  41.   Debug logging:                     No
  42.   Packet logging:                    No
  43.   Act as server:                     Yes
  44.   Talk to server:                    Yes
  45.   Advanced server functions:         No
  46.   Local file management:             Yes
  47.   Command/Init files:                Yes
  48.   File attributes packets:           No
  49.   Command macros:                    No
  50.   Raw file transmit:                 No
  51.  
  52. The main differences between MacKermit and other Kermit programs are:
  53.  
  54.    - In  MacKermit  you  are  always  connected  via  a  terminal emulator
  55.      (VT102).
  56.  
  57.    - MacKermit commands are issued by means of pull-down menus that  over-
  58.      lay your terminal session.
  59.  
  60. The  major  menus  are File, Settings, Remote, and Transfer.  The File menu in-
  61. vokes Kermit's file transfer functions, allows settings to be  saved  and  res-
  62. tored,  and  like  most Macintosh applications, includes a "quit" selection for
  63. leaving the program.
  64.  
  65. The Settings menu provides dialog boxes for file, communications, and  protocol
  66. settings.  The Remote menu has the commands that can be sent to Kermit servers,
  67. as well as an option to turn Macintosh  Kermit  itself  into  a  server.    The
  68. Transfer menu gives you a standard Macintosh file box, allowing you to transfer
  69. directly to the selected application.
  70.  
  71.  
  72. 1.1. The Macintosh File System
  73.  
  74. The Macintosh file system consists of one or more disks, each  disk  containing
  75. files.    All  files on a disk must have a unique name.  Files may be collected
  76. together into "folders", but folders are not analogous to directories on  other
  77. file systems, and no two folders on the same disk may contain files of the same
  78. name.  Macintosh file names may contain practically any  printable  characters,
  79. including  space  and punctuation -- but colon (":")  should be avoided because
  80. it is used in device names.
  81.  
  82.  
  83. 1.2. File Transfer
  84.  
  85. Glossary:
  86.  
  87.    - Mode - Text or Binary.  Binary means the data is sent or stored with-
  88.      out  modification.  Text  means  that every carriage return character
  89.      (CR) in a Macintosh file is translated to a  carriage-return-linefeed
  90.      (CRLF)  sequence  when sending, and every CRLF in an incoming file is
  91.      turned into a CR when stored on  the  Mac  disk.    A  text  file  is
  92.      produced when you save a file from MacWrite using the "text only" op-
  93.      tion; text files are not associated with any particular Macintosh ap-
  94.      plication  and can be sent in a useful fashion to other kinds of com-
  95.      puters.
  96.  
  97.    - Fork - Data or Resource.  Macintosh files may have two "forks".   The
  98.      data  fork  contains  data for an application; the resource fork con-
  99.      tains icons, strings, dialog boxes, and so forth.   For  instance,  a
  100.      MacWrite  document  contains  text  and formatting information in the
  101.      data fork, and fonts in the resource fork.  For applications, the ex-
  102.      ecutable code is stored in the resource fork.
  103.  
  104. Macintosh  Kermit  supports the standard Kermit commands for transferring files
  105. -- Send, Receive, and Get.  Invocation of any  of  these  commands  produces  a
  106. MacKermit file dialog box in which you specify the file name, the mode, and the
  107. fork.  Defaults are determined from the selected file or taken from the current
  108. file settings, described below.
  109.  
  110. When  you select the Send command, you get a MacKermit file open box, which in-
  111. cludes the standard Macintosh dialog items -- a file list, Disk and Eject  but-
  112. tons,  etc.    You can only send one file at a time, by clicking on its name in
  113. the file list.  Clicking the Disk button will switch the file list  to  another
  114. physical disk.  If desired, you can type an alternate name to send the file un-
  115. der.  When you select a file, MacKermit examines its type; if the type is APPL,
  116. then  MacKermit expects to send the resource fork in binary mode, otherwise the
  117. data fork in text mode.  The Mode and Fork radio  buttons  will  display  these
  118. choices; you may change them before clicking the Send button.
  119.  
  120. You can receive or get multiple files, providing the opposite Kermit is capable
  121. of sending multiple files in a single transaction (most are).  As files arrive,
  122. they will be decoded according to the current mode (text or binary), and stored
  123. in the default fork (data or resource) under either the name they  arrive  with
  124. (overwriting  existing files of the same names) or under new unique names (when
  125. name conflicts occur), according to the current default  for  name  collisions.
  126. You  may  also elect to perform an "attended" receive, in which you have an op-
  127. portunity to override all file defaults on a per-file basis.  But  this  option
  128. must be used with caution -- if you take too long (more than about a minute) to
  129. execute an incoming file's dialog box, the opposite Kermit could time  out  and
  130. terminate the transaction.
  131.  
  132. The  folder  for new files is the same as the location of the settings file, or
  133. if no settings file was used then the new files appear on the desktop.  If  you
  134. are  transferring  a  lot  of  files  and  want to keep them together, create a
  135. folder, drag the settings file into it, and double click on the settings  file;
  136. all created files will appear in that folder.
  137.  
  138. File  transfers can be cancelled by clicking on the Cancel File or Cancel Group
  139. buttons.  These will always work when sending.  When receiving, they will  work
  140. if the opposite Kermit honors this (optional) feature of the protocol.
  141.  
  142. In  any  case,  an "emergency exit" from any protocol operation can be taken at
  143. any time by typing  "Command-."  --  that  is,  hold  down  the  Command  (Fan,
  144. Cloverleaf) key and type period.
  145.  
  146.  
  147. 1.3. Remote Commands
  148.  
  149. The  Remote  menu allows you to send commands to a Kermit server.  The response
  150. from these  commands  (if  any)  is  displayed  in  a  special  pop-up  window.
  151. Responses  to  multiple  Remote  commands  are separated by a dashed line.  The
  152. response window can be scrolled, sized, and positioned, and can  be  hidden  by
  153. clicking  the  menu  item "Hide Response" or the window's go-away box; all text
  154. remains intact and will be appended to the next time you do a  Remote  command;
  155. it  can  also  be  brought to the foreground by clicking the Show Response menu
  156. item.  Note that typein to the terminal emulator will not take effect when  the
  157. response window -- or any other window -- is up front.
  158.  
  159. If  the  response window gets too full (i.e. fills up the free memory available
  160. to the MacKermit application), the program will probably bomb.
  161.  
  162. If the remote Kermit server is in binary mode, its responses to Remote commands
  163. may  look strange.  For instance, a Unix Kermit server in binary mode will send
  164. lines of text separated by only linefeeds, rather than CRLFs.
  165.  
  166. A Remote command can be cancelled by taking the Emergency Exit (Command-.).
  167.  
  168.  
  169. 1.4. Settings
  170.  
  171. You can change File, Communications, and Protocol settings by  using  the  Set-
  172. tings  pull-down menu.  You can save and restore these settings by invoking the
  173. appropriate selection in the File menu.  If the bundle bit has  been  correctly
  174. set on your version of MacKermit you can double-click on the resulting document
  175. to start MacKermit with those settings.
  176.  
  177. The File settings establish the defaults for file transfer:
  178.  
  179.    - Mode: text or binary.  Used for received files only.   When  sending,
  180.      MacKermit  tries to figure out an appropriate mode for the file being
  181.      sent (but then lets you override it the Send File dialog).
  182.  
  183.    - Fork: which fork -- data or resource -- to send, or to store  an  in-
  184.      coming file into.
  185.  
  186.    - Naming: Whether incoming files should supersede existing files of the
  187.      same name, or a new unique name should be assigned to them.   If  the
  188.      latter,  the  new  name is formed by adding a dot and a number to the
  189.      end.  For instance, if a file called FOO exists and a file called FOO
  190.      arrives,  MacKermit  will  store the arriving file as FOO.1; if FOO.1
  191.      exists, then FOO.2, etc.
  192.  
  193.    - Attended versus Unattended operation for incoming files.
  194.  
  195. The Communications settings allow you to set the baud  rate  (anywhere  between
  196. 300  baud and 57.6K baud), parity (odd, even, mark, space, or none), and duplex
  197. (full - remote echo, half - local echo).
  198.  
  199. The Protocol settings allow you to set packet parameters for both incoming  and
  200. outbound  packets.  These include the block check type (1 or 2 character check-
  201. sum, 3-character 16-bit CRC-CCITT), line turnaround  handshake  character  (for
  202. file  transfer with half duplex systems), packet start and end characters, pad-
  203. ding, packet length, timeout interval, and  so  forth  (Refer  to  Kermit  User
  204. Guide).    Characters  are  specified by entering their ASCII value in decimal,
  205. e.g. 1 for Control-A, 13 for Control-M (Carriage Return), etc.
  206.  
  207.  
  208. 1.5. Terminal Emulation
  209.  
  210. MacKermit provides a subset of the features of  the  DEC  VT102  terminal;  the
  211. VT102  is  a  VT100 with line and character insert/delete functions added.  The
  212. functions provided are sufficient to allow MacKermit to act as a  terminal  for
  213. EMACS  as it exists on the DEC-20, VAX (CCA EMACS on VMS or UNIX), and for most
  214. host-resident display-oriented applications that expect to do cursor  position-
  215. ing  and editing on the VT100 screen.  MacKermit does not currently support the
  216. following VT100/102 functions:
  217.  
  218.    - double height or double width lines
  219.    - smooth scrolling
  220.    - 132 columns
  221.    - Interpretation of multiple parameters in a single escape sequence
  222.    - etc
  223.  
  224. (this is not an exhaustive list)
  225.  
  226. The keyboard is set up by default as follows: The COMMAND (Fan, Cloverleaf) key
  227. is used as the Control key.  The CAPS LOCK key forces all alphabetic characters
  228. to upper case, and causes keys on the numeric keypad to send VT100  keypad  es-
  229. cape  sequences.  The OPTION key is "Control-Meta" (explained below).  The ter-
  230. minal emulator sends ESC (escape) when the "`" key is pressed unshifted.    The
  231. character  "`"  can  be sent by typing Control (Command) and the same key.  The
  232. Backspace key sends a Delete (Rubout) and Control-Backspace sends a  Backspace.
  233. The  main keypad Enter key sends a "short" (250ms) BREAK signal.  The Mac+ does
  234. not have a main keypad Enter key, so the BREAK function must be  reassigned  to
  235. another  key.    Use  CKMKEY  (see  below) to do this.  The short break is F126
  236. (function number 126) and long break is F127.
  237.  
  238. MacKermit (V0.8 and later) comes with a  separate  key  configuration  program,
  239. CKMKEY,  which  lets you change the behavior of the keys, define function keys,
  240. and so forth.  CKMKEY is described in detail below.
  241.  
  242. MacKermit (V0.8(43A) and later) includes a mouse-controlled  cursor  postioning
  243. feature  for  use  during terminal emulation.  When the mouse button is pressed
  244. while the Option and Command keys are held down, the program  acts  as  if  you
  245. typed the keypad arrow keys to move the terminal cursor to where the mouse cur-
  246. sor is.  You must have already defined the keypad arrow keys to  send  the  ap-
  247. propriate  character sequences for your host application.  The Catch-22 here is
  248. that if you don't have a keypad, there's no way for you to  define  the  keypad
  249. keys  using  MacKermit's  keyboard configurator.  In that case, you can use the
  250. VT100 startup file provided with MacKermit, which assigns the normal VT100  ar-
  251. row  key  sequences  to  the  keypad  arrow  keys,  and  therefore  also to the
  252. mouse-cursor feature.
  253.  
  254. MacKermit honors your parity communications setting by using built-in functions
  255. of  the Mac's serial i/o chip.  Unfortunately, the chip has an unpleasant quirk
  256. -- arriving characters that do not have  the  specified  parity  are  discarded
  257. rather  than  passed to the requesting application.  Thus, if you are connected
  258. as a terminal using MacKermit to a device that requires,  say,  odd  parity  on
  259. characters  sent  to  it, but does not put odd parity on characters it sends to
  260. you, then many incoming characters will not appear on your screen.
  261.  
  262. To allow useful coexistence of desk accessories and Kermit, the terminal emula-
  263. tion  may  be  dragged  using the drag bar.  A desk accessory that overlays the
  264. Kermit window can be clicked upon to move it behind the Kermit window, and then
  265. the Kermit window can be dragged to reveal the hidden desk accessory so that it
  266. can be restored to the foreground.  The same thing can be  done  with  Kermit's
  267. own  remote response window.  Note that Kermit's terminal emulation window does
  268. not accept input when any other window is in the foreground.
  269.  
  270. The following features are missing from the MacKermit  terminal  emulator,  and
  271. may be added in subsequent releases:
  272.  
  273.    - capturing text from the screen (e.g. cutting to clipboard, saving off
  274.      top)
  275.    - screen rollback, sizing
  276.    - modem or dialer control
  277.    - login scripts
  278.    - transmission of raw text to host (e.g. pasting to screen)
  279.    - printer support
  280.  
  281. MacKermit does not use XON/XOFF flow control during terminal emulation or  file
  282. transfer.    The terminal emulator can normally keep up at 9600 baud, but after
  283. several continuous scrolling screens at this  speed,  some  characters  may  be
  284. lost.    In the present version, when running at high baud rates keep your ter-
  285. minal in page mode, or use "more", or view text  with  a  non-scrolling  screen
  286. editor.    Also,  don't drag the terminal emulation window while characters are
  287. arriving; if you do, the characters will be lost and the  display  will  become
  288. confused.
  289.  
  290.  
  291. 1.6. Installation
  292.  
  293. MacKermit  is  distributed  in source form for building on Unix (or VMS/Eunice)
  294. systems that have the Stanford SUMACC  Macintosh  cross-development  tools,  in
  295. .HQX  "binhex"  form,  and sometimes also as a binary resource file.  Those who
  296. want to work from the source are referred to the file CKMKER.BLD  for  instruc-
  297. tions.
  298.  
  299. If  you  have the binary resource file available (its name will be CKMKER.RSRC,
  300. ckmker.rsrc, CKMKER.RSR, ckmker.rsr, or some variation on these,  depending  on
  301. what  system  it's stored on and how it got there), AND if you have "MacPut" on
  302. your system and MacTerminal on your Mac, AND if  you  have  an  8-bit-wide  (no
  303. parity)  data path between your Mac and your system, use MacPut to download the
  304. binary resource file to MacTerminal's XMODEM option on your Mac.   After  doing
  305. this  you  must  use  SetFile on the Mac to set the author to KERM, the type to
  306. APPL, and turn on the bundle bit.  For CKMKEY, the author should be KERK.
  307.  
  308. If you have an earlier release of Columbia MacKermit, you  may  use  Kermit  in
  309. place of MacTerminal and MacPut.
  310.  
  311. If  you  don't  have  the  binary resource file available, you can download the
  312. CKMKER.HQX file in the same manner, then run "binhex" (version 4) on it.
  313.  
  314.  
  315. 1.7. CKMKEY - Macintosh Kermit's Keyboard Configurator
  316.  
  317. This describes CKMKEY V0.8(0), May 1985.
  318.  
  319. The version number of CKMKEY indicates compatability with the like  version  of
  320. CKMKER  --  Macintosh Kermit, referred to simply as "Kermit" from now on.  Edit
  321. numbers (within parentheses) may differ.  If Kermit is  used  with  a  settings
  322. file  containing  a  key  configuration  produced by an incompatible version of
  323. CKMKEY, then that configuration will be ignored.
  324.  
  325.  
  326. 1.7.1. What is CKMKEY?
  327.  
  328. CKMKEY is a  keyboard  configurator  program  for  use  with  Macintosh  Kermit
  329. (versions 0.8 and greater). CKMKEY allows:
  330.  
  331.    - Redefinitions of keys
  332.  
  333.    - Definitions of multicharacter function keys
  334.  
  335.    - Selection of long and short BREAK keys
  336.  
  337. CKMKEY  is  a  separate program from Kermit.  It may be thought of as an editor
  338. for Kermit's terminal emulator key definition resource, which is kept in a Ker-
  339. mit  settings file.  Before you can use CKMKEY, you must already have used Ker-
  340. mit to create a settings file to operate on.
  341.  
  342. The reason CKMKEY is separate from Kermit is that there is not enough  room  in
  343. the memory of a 128K Macintosh to hold a program that can do both.  CKMKEY dis-
  344. plays and changes key settings, Kermit uses them.  Once you have started Kermit
  345. with a given set of key definitions, there is no way to examine or change them.
  346.  
  347. Some  familiarity  with  the ASCII alphabet is assumed in the following discus-
  348. sion.
  349.  
  350.  
  351. 1.7.2. Modifier vs Normal Keys
  352.  
  353. The Macintosh keyboard is composed of normal keys and modifier keys.   Modifier
  354. keys are SHIFT, CAPS LOCK, OPTION, and COMMAND (also known as APPLE, CLOVER, or
  355. FAN).  Only one normal key can be selected at a time, but one or more  modifier
  356. keys can be depressed along with it.
  357.  
  358.  
  359. 1.7.3. Key Maps
  360.  
  361. When  a key on the keyboard or numeric keypad is depressed the result is a scan
  362. code -- a number between 0 and 127 (see Inside Mac Event Manager for details if
  363. you're interested).  A table indexed by scan code resulting in the character to
  364. be displayed or transmitted will be referred to as a "keymap" or "key mapping."
  365.  
  366. On the standard Mac many keymaps exist -- the modifier  keys  (such  as  SHIFT)
  367. specify  which  keymap  is  selected.    For  example, when no modifer keys are
  368. depressed the keymap contains the lowercase alphabet, numbers and some punctua-
  369. tion.  The keymap in use when the SHIFT modifer is depressed contains the capi-
  370. tal letters and special characters.
  371.  
  372. All in all it is possible to select 16 different  keymaps  by  depressing  from
  373. zero  to  four  modifier keys.  Normally however, 6 or so distinct keymaps will
  374. suffice.
  375.  
  376. CKMKEY allows you to redefine 6 keymaps: shifted and unshifted combinations  of
  377. keymaps   named  "normal",  "capslock",  and  "control".    These  keymaps  are
  378. predefined with the expected values -- the control map is preloaded  with  con-
  379. trol  codes, the capslock preloaded with the unmodifed keymap but with all let-
  380. ters uppercase.
  381.  
  382. In this document modifier keys are written in capital letters and key map names
  383. are  written  in lowercase.  SHIFT, CAPS LOCK, COMMAND, and OPTION are modifier
  384. keys, "normal" "capslock" and "control" are key maps internal to CKMKER.  Since
  385. one  of  the  major  functions  of CKMKEY is to change maps invoked by modifier
  386. keys, it is important to keep this distinction in mind.
  387.  
  388.  
  389. 1.7.4. What's in CKMKEY's Keymaps
  390.  
  391. A keymap is a list of 128 numbers.  Which keymap is selected depends upon which
  392. modifier  keys are depressed, and the entry within the key map is determined by
  393. the scan code.  A keymap entry is an 8-bit quantity:  if the high order bit  is
  394. 0,  then  the  entry is the 7-bit ASCII character to be transmitted through the
  395. serial port; if the high bit is 1, then the remaining 7 bits are an index  into
  396. the function-key table.
  397.  
  398. Notice  that  only  single  7-bit values can be directly translated through the
  399. CKMKEY keymap.  If you want a single key to transmit multiple characters,  then
  400. you can designate that key to be a "function key", and the key map will contain
  401. an indirect reference to the function-key table.  If you want a key to transmit
  402. an 8-bit value, assign the "meta" operation to one of the modifier keys and use
  403. the meta key together with the desired key (see below).
  404.  
  405. Functions are numbered 0-127 with the highest few being  reserved  for  special
  406. use.  Currently functions 126 and 127 send a short 250 millisecond BREAK signal
  407. and a long 3.5 second BREAK respectively.  In the future more special functions
  408. may  be  allocated  so  (since  it is arbitrary anyway) please use low numbered
  409. functions when defining your own.
  410.  
  411.  
  412. 1.7.5. Menus
  413.  
  414. CKMKEY has two menus, File and Set.  First you must use the File menu to select
  415. and open a Macintosh Kermit settings file, which in turn has been created using
  416. the Kermit Save Settings option from its own File menu.  Then use the Set  menu
  417. to establish or alter key definitions, then use the File menu again to save the
  418. settings file back for Kermit.  A variety of Kermit settings files can be kept,
  419. each  with  its  own  collection of settings and key definitions; Kermit can be
  420. started with the desired settings by double clicking on one of  these  settings
  421. files from the Macintosh desktop.
  422.  
  423. Menus  consist  of  options.    If  an option is followed by an ellipsis (three
  424. dots...) then clicking it will produce a dialog box of  some  kind;  otherwise,
  425. clicking it causes the indicated action to be performed immediately.  If an op-
  426. tion is dimmed then it is not available for some reason --  for  instance,  you
  427. can't set any keys until you open a settings file.
  428.  
  429.  
  430. 1.7.6. MENU: Set
  431.  
  432. The  Set  menu includes dialogs for setting keys, defining functions, and reas-
  433. signing modifier keys.
  434.  
  435.  
  436. 1.7.6.1. DIALOG: Set Modifer Keys
  437.  
  438. Background:
  439.  
  440. Skip ahead to the next section if you already know  about  things  like  SHIFT,
  441. CAPS LOCK, CONTROL, and META.
  442.  
  443. On  a  typewriter  the  only modifier key is SHIFT.  Typing a character with no
  444. modifier key depressed selects a lowercase letter or the character  printed  on
  445. the  lower  face  of  the keytop (say, the digit "4").  Typing a character with
  446. SHIFT depressed selects an uppercase letter or the character printed on the up-
  447. per  face of the keytop (say, a dollar sign).  Some keyboards also have a SHIFT
  448. LOCK key, which stays down once pressed and pops up the next time it's pressed;
  449. its  operation  is equivalent to holding down SHIFT.  And some keyboards have a
  450. CAPS lock key which operates like SHIFT LOCK, but only upon letters.
  451.  
  452. Computer terminals also have a modifier key called  CONTROL  (or  CTRL).    Its
  453. function  is  a  little  less  obvious: it is intended to produce one of the 33
  454. characters in the "control range" of the ASCII alphabet.    Control  characters
  455. are not graphic -- they are intended for use as format effectors (like carriage
  456. return, formfeed, tab, backspace), for transmission control, or for device con-
  457. trol.    The remaining 95 characters -- letters, digits, and punctuation -- are
  458. the graphic characters.  When a character is typed with  the  CONTROL  modifier
  459. pressed,  its  "control equivalent" is transmitted.  By convention, the control
  460. equivalent of A is Control-A, B is Control-B, etc, and  there  are  also  seven
  461. special  control characters generally associated with punctuation characters or
  462. special keys.   For  the  "alphabetic"  control  characters  Control-A  through
  463. Control-Z,  SHIFT or CAPS LOCK modifiers are ignored; for the others, operation
  464. varies from terminal to terminal.
  465.  
  466. The SHIFT and CONTROL modifiers allow all 128 ASCII characters to be sent  from
  467. a  normal  typewriter-like  keyboard  that has about 50 keys.  However, certain
  468. host-resident computer applications -- notably  the  full  screen  text  editor
  469. EMACS  and  its  descendents  --  can  be  used to greater advantage with a 256
  470. character alphabet (EMACS responds to single-character commands, and  the  more
  471. characters a terminal can send, the more commands are directly available).  For
  472. this purpose, some terminals also provide a META modifier key.  This key simply
  473. causes  the  high-order  ("8th") bit of the selected ASCII value to be set to 1
  474. upon transmission.  META characters can only be transmitted when the communica-
  475. tion  path  allows all 8 bits to pass transparently; when this is not possible,
  476. software like EMACS  allows  a  sequence  of  two  7-bit  ASCII  characters  to
  477. represent  a  single  meta  character.    The  advantage  of having a real META
  478. modifier key is that it can be  held  down  while  the  actual  key  is  struck
  479. repeatedly  or even autorepeats, whereas a use of a "meta prefix" requires much
  480. more typing.  To illustrate, suppose META-F is the command to  go  forward  one
  481. word.    If  you want to execute this operation repeatedly, just hold down META
  482. and F and let it autorepeat.  If you don't have a META key, then  you  have  to
  483. use  a "meta prefix" character (usually escape), and to enter META-F repeatedly
  484. in this case, you'd have to type <escape>F<escape>F<escape>F...etc.
  485.  
  486. Macintosh Kermit Modifier Keys:
  487.  
  488. You can define the modifier key to keymap correspondence in CKMKEY by selecting
  489. the  "Modifer Keys..." menu item under SET, or by double clicking on a modifier
  490. key while in the SET KEYS dialog.
  491.  
  492. The SET MODIFIERS dialog lets you define what map OPTION, CAPS LOCK and COMMAND
  493. refer  to.  Notice that SHIFT is missing -- SHIFT always references the shifted
  494. equivalents to the normal, control and caps lock maps.
  495.  
  496. The dialog is layed out in columns with the three modifier keys as column head-
  497. ings  and  the three map names below.  Also under each column is a "pseudo" key
  498. map for "meta."
  499.  
  500. Meta is not a map, but an operation: it augments the  value  being  transmitted
  501. after  it  has been read from its map.  Meta can either be set to send a prefix
  502. string before the character or to turn the high  order  (8th)  bit  on  in  the
  503. transmitted  character.  The default prefix for meta is set to be 033 (escape).
  504. If a meta modifier key is depressed and the key results in a function reference
  505. then  no  modification occurs; functions are not "metized".  However, functions
  506. can be defined to include 8-bit values.
  507.  
  508. Notice that meta can be set in conjunction with a key map.  Since  meta  is  an
  509. operation  as described above there is no ambiguity.  Consider for example set-
  510. ting OPTION to reference the  "control"  map  and  selecting  "meta"  for  this
  511. modifier key as well.  The result is a control-meta key.
  512.  
  513.     CAUTION:  If  you  have  used  Kermit's communications settings menu to
  514.     select any parity other than "none", then any high order bits that  may
  515.     be  set  by CKMKER's key mapping will be superseded when Kermit applies
  516.     the selected parity to outbound characters.
  517.  
  518. The SET MODIFIER KEYS dialog  also  lets  you  select  your  meta  preferences:
  519. whether you want to use the 8th bit toggled on, or a prefix string.  The prefix
  520. string is entered in the same manner as a function definition  (backslash  fol-
  521. lowed by 3 octal digits for non-printable characters, see below).
  522.  
  523. Note that it is possible to cause ambiguities when selecting and using modifier
  524. keys.  For example say you set OPTION to refer to the control map, and you  set
  525. CAPS  LOCK  to refer to the caps map; at this point if you hold both OPTION and
  526. CAPS LOCK down it is unclear which map you want your character  to  come  from.
  527. To  try to prevent this type of ambiguity the SET KEY dialog will beep when you
  528. are holding down or mousing an ambigous set of modifier keys.
  529.  
  530. The Kermit code itself references maps in this precendence: if  a  control  map
  531. modifier  is  depressed  then  use  control map, else if a capslock modifier is
  532. depressed use capslock, otherwise use the normal map.
  533.  
  534. A sample modifier key configuration is shown in Figure -MACMKEY.
  535.  
  536.     -----------------------------------------------------------------------
  537.  
  538.                      OPTION          COMMAND         CAPS LOCK
  539.  
  540.                      o  Normal       *  Normal       o  Normal
  541.                      *  Control      o  Control      *  Control
  542.                      o  Caps         o  Caps         o  Caps
  543.                     [X] Meta        [X] Meta        [ ] Meta
  544.  
  545.               Figure 1-1:   Macintosh Kermit Modifier Key Dialog
  546.  
  547.     -----------------------------------------------------------------------
  548.  
  549. Here the CAPS LOCK key is used to reference "control", the COMMAND  key  to  do
  550. the  "meta"  operation, and OPTION is "control-meta".  Holding down COMMAND and
  551. CAPS LOCK together will also result in control-meta.
  552.  
  553.  
  554. 1.7.6.2. DIALOG: Set Function Definitions
  555.  
  556. Background:
  557.  
  558. Skip to next section if you know what function keys are.
  559.  
  560. Many popular terminals have "function  keys"  in  addition  to  the  alpabetic,
  561. numeric,  punctuation,  and  modifier  keys described above.  Function keys are
  562. usually labeled F0, F1, F2, ..., or PF1, PF2, ...  On some terminals, like  the
  563. DEC VT100, the function keys send predefined sequences of characters -- for in-
  564. stance PF1 sends three characters: ESCAPE (ASCII 033),  followed  by  "O",  and
  565. "P".  On others, the function keys may have arbitrary strings assigned to them.
  566. For instance, if you find yourself typing "Aaaarrrgggghhh!!!  Sigh..."  a  lot,
  567. you  can  assign  this  string to function key F1, and then pressing the F1 key
  568. will cause this entire character string to be transmitted.
  569.  
  570. Macintosh Kermit Function Keys:
  571.  
  572. The Macintosh has no physical function keys -- no keys are marked F0,  F1,  F2,
  573. etc.    However,  any key (modified by any combination of modifier keys) may be
  574. designated as a "soft" function key.
  575.  
  576. Selecting "Function Definitions..." from the SET menu brings  you  to  the  SET
  577. FUNCTIONS  dialog (it would be nice if you could double click on a function key
  578. in the SET KEYS dialog but that is not yet available).
  579.  
  580. Use SET FUNCTIONS to declare a function definition string.  Scroll through  the
  581. function  definition  list and select a function to define, preferably starting
  582. with F0, though this is not required (high numbered functions are reserved  for
  583. special  uses).  Type in the function definition; non printable characters must
  584. be entered with a backslash ("\") followed by exactly (yes exactly) three octal
  585. characters  representing  the  ASCII  value,  for  instance "\015" for carriage
  586. return.  A backslash itself is entered as "\134".  The function definition  has
  587. to fit in the box.
  588.  
  589. Having  defined a function, you must use SET KEYS to actually associate it with
  590. a key.  Note that it is possible to associate a function  with  more  than  one
  591. key.
  592.  
  593.  
  594. 1.7.6.3. DIALOG: Set Keys
  595.  
  596. Selecting  the  "Keys..." menu item under SET initiates the SET KEYS dialog for
  597. redefining individual keys.
  598.  
  599. SET KEYS displays a picture of the keyboard.  You  can  either  hold  down  the
  600. modifier  and key you wish to define or click on the displayed picture with the
  601. mouse (double clicking on one of the modifier keys brings up the  SET  MODIFIER
  602. KEYS  dialog).    Once a key is selected, it and any modifiers are highlighted,
  603. the name of the key and its value are displayed in the  lower  portion  of  the
  604. dialog.    You  may  enter the new value in the little box by selecting the box
  605. with the mouse and then typing a DECIMAL (yes decimal) number from  0  to  127.
  606. Then  you should click on either SET KEY or else SET FUNCTION KEY.  Clicking on
  607. SET KEY means that the key should transmit the ASCII character corresponding to
  608. the  given  value (subject to modification by the meta key); clicking SET FUNC-
  609. TION KEY means the number you entered in the box is a function number and  that
  610. the key should transmit the character string associated with that function.
  611.  
  612. SET KEYS does not display a picture of the numeric keypad, but may be used with
  613. the keypad anyway -- just select the desired key by pressing it and then define
  614. it as above.
  615.  
  616.  
  617. 1.7.7. MENU: File
  618.  
  619. The  File  menu  must be used to Open a Kermit settings file before CKMKEY will
  620. allow you do perform any other operations.   You  may  also  Quit  from  CKMKEY
  621. through  the File menu, and you can save your work.  The Save option allows you
  622. to save the settings file back under its own name, replacing the previous copy.
  623. If you need to make copies of settings files, you can use Kermit itself to save
  624. them under different names, or else you can use the Finder.
  625.  
  626. There is also a Decompile option, that is of use only to programmers working on
  627. Macintosh  Kermit -- it decompiles the key definition resource into a form that
  628. can be included in a C program.
  629.  
  630.  
  631. 1.7.8. CKMKEY Known Limitations, Restrictions, Bugs
  632.  
  633.    - There is no picture of the numeric keypad in Set Keys.
  634.  
  635.    - In Set Keys, when you strike a key on the numeric keypad, its name is
  636.      not displayed.  You can still make assignments to the key.
  637.  
  638.    - There  is  no  way to define a key from the numeric keypad unless you
  639.      actually have a numeric keypad.
  640.  
  641.    - You can't save from CKMKEY under a different name.  Use the Finder or
  642.      Kermit to do that.
  643.  
  644.    - You  must  use  decimal  numbers in the SET KEY dialog, and backslash
  645.      followed by 3 octal digits in function definitions, which can be con-
  646.      fusing.
  647.  
  648.    - You  may  have  problems  on a 128K mac if you define many long func-
  649.      tions.
  650.  
  651.    - CKMKEY doesn't deal with write protected diskettes very well.
  652.  
  653.  
  654. 1.7.9. Unlocking CAPS LOCK
  655.  
  656. (Adapted   from   directions   posted   by   David   Chase    <rbbb@rice>    on
  657. INFO-MAC@SUMEX-AIM, Friday 14 December 1984.  Follow these instructions at your
  658. own risk.  Not the authors, nor David Chase, nor Columbia University, nor  Rice
  659. University  provide  any  warranty,  nor  acknowledge  any liability or respon-
  660. sibility for damage, injury, inconvenience, or loss of Apple or  other  service
  661. warranty sufferred as a result of the publication of these directions.)
  662.  
  663. A  major  impediment to using the Macintosh as a terminal is that the CAPS LOCK
  664. key is where you would normally  expect  to  find  the  CONTROL  key.    A  key
  665. redefinition  package,  such  as CKMKEY, can assign the CONTROL function to the
  666. COMMAND or OPTION keys but these keys are not easy to reach.  CONTROL can  also
  667. be assigned to the CAPS LOCK key using software, but the CAPS LOCK key includes
  668. a mechanical locking device.  The following directions tell how to  remove  the
  669. locking  device  so  that  the CAPS LOCK key will go up and down like the other
  670. keys.  PROCEED AT YOUR OWN RISK.
  671.  
  672. Tools you'll need:
  673.  
  674.    - Phillips screwdriver for screws on bottom of the keyboard.
  675.    - Solder sucker/wick.
  676.    - Soldering iron.
  677.    - Small prying tools (jewelers screwdrivers, small knife blade, etc).
  678.    - Tweezers/small needlenose pliers.
  679.    - Some paper clips or straight pins.
  680.  
  681. Now follow these steps:
  682.  
  683.    1. Remove the five screws.  The keyboard should fall into three pieces.
  684.  
  685.    2. GENTLY pry off the Caps Lock keycap.  This takes a little patience.
  686.  
  687.    3. Remove the restoring spring so it doesn't get in the way.
  688.  
  689.    4. Locate the two connections to the Caps Lock key on the back  of  the
  690.       PC  board, and remove all solder from them using wick or sucker.  Be
  691.       careful not to overheat the solder pads, since they can  be  damaged
  692.       (come loose from the PC board).
  693.  
  694.    5. Pry  back  the  plastic locking clips holding the key in, and remove
  695.       it.  (All the keys are clipped into a metal  frame.    Removing  the
  696.       metal  frame is not possible, since all the keys are soldered to the
  697.       PC board, and clipped to the frame.  The clips are  located  "north"
  698.       and  "south"  of  the  key,  where the number row is "north" and the
  699.       space bar "south".)  There are four clips holding the bottom of  the
  700.       key on; pry these back, and, WHILE HOLDING THE KEY BOTTOM UP, remove
  701.       the bottom of the key.  You may have to use  some  makeshift  tools,
  702.       like a couple of unbent paper clips, to hold the four clips open.
  703.  
  704.    6. Two   pieces  should  be  ready  to  fall  out;  a  small  piece  of
  705.       PC-board-like material (about 7/16 by 3/32 inch, with two notches on
  706.       one edge and a tiny hole in the center), and a tiny piece of wire (a
  707.       small, beefy staple with short legs).  Let them fall  out.  (It  may
  708.       help  to  toggle the key).  These two pieces are the locking device,
  709.       they should be removed and left out of the reassembly.
  710.  
  711.    7. Replace the restoring spring, snap the key back into place, resolder
  712.       the two leads, screw the keyboard back together, and replace the key
  713.       cap.  You may wish to experiment with the spring to reduce the key's
  714.       springiness  (this  can  be done with the keyboard assembled, though
  715.       removing the cap is more difficult).
  716.  
  717. For those who want to map the CAPS LOCK key to CTRL, but don't  want  to  alter
  718. the  keyboard as described in the manual, but still want to inhibit the locking
  719. function, the following suggestion is offered:
  720.  
  721. Pry off the key using a small screwdriver.  There is a spring  whose  end  goes
  722. through the plastic support.  Stick a very small wad of paper or soft putty be-
  723. tween the tip and the bottom of the keyboard.  This will prevent the  key  from
  724. depressing  all the way and locking, but still allow contact of the key.  Even-
  725. tually, the paper will work loose and you will need to find it and  repeat  the
  726. procedure.
  727.  
  728.  
  729.  
  730. Index
  731.  
  732. ,
  733.           Binhex   1
  734.  
  735.           CKMKER   0
  736.           CKMKEY   1
  737.  
  738.           Macintosh Kermit   0
  739.           META Key   2
  740.  
  741.           Setfile   1
  742.  
  743.  
  744.  
  745.                                Table of Contents
  746.  
  747. 1. MACINTOSH KERMIT                                                           0
  748.  
  749.    1.1. The Macintosh File System                                             0
  750.    1.2. File Transfer                                                         0
  751.    1.3. Remote Commands                                                       0
  752.    1.4. Settings                                                              0
  753.    1.5. Terminal Emulation                                                    1
  754.    1.6. Installation                                                          1
  755.    1.7. CKMKEY - Macintosh Kermit's Keyboard Configurator                     1
  756.        1.7.1. What is CKMKEY?                                                 1
  757.        1.7.2. Modifier vs Normal Keys                                         1
  758.        1.7.3. Key Maps                                                        1
  759.        1.7.4. What's in CKMKEY's Keymaps                                      1
  760.        1.7.5. Menus                                                           2
  761.        1.7.6. MENU: Set                                                       2
  762.            1.7.6.1. DIALOG: Set Modifer Keys                                  2
  763.            1.7.6.2. DIALOG: Set Function Definitions                          2
  764.            1.7.6.3. DIALOG: Set Keys                                          3
  765.        1.7.7. MENU: File                                                      3
  766.        1.7.8. CKMKEY Known Limitations, Restrictions, Bugs                    3
  767.        1.7.9. Unlocking CAPS LOCK                                             3
  768.  
  769. Index                                                                         i
  770.  
  771.  
  772.  
  773.                                 List of Figures
  774.  
  775.    Figure 1-1:   Macintosh Kermit Modifier Key Dialog                         2
  776.