ghh@clarity.princeton.edu (Gilbert Harman) (05/14/89)
Here is how to use Automac III to get EMACS like key bindings in WORD 4. (Automac III is a macro program distributed with Word 4.) It is relatively easy to bind ^F to forward-char in WORD using Automac and similarly for other one character sequences. (Give "^F" [hat F] as the name of the character. You will then be asked to press the relevant key before using the recorder to define it.) To use <escape> as a macro-character, you have to set up a separate file of key-bindings, called "Meta" for example. These represent the second key that you press after pressing <escape>. You will therefore have two or more key-binding files, (1) "Microsoft Word (keys)" representing the key-bindings you start with when you start up Word and (2) "Meta" the key bindings that you will use after pressing <escape>. In the first file you will set escape to lead the second file. In the second file, you will set each of various keys to do the relevant command and then return you to the first file of bindings. For example, you might want <escape>-F to move you forward one word. In the file "Microsoft Word (keys)" the <escape> key will be defined so as to change the bindings to those in the "Meta" file. In setting up the "Meta" file you will want to start by defining a sequence to take you back to the "Microsoft Word (keys)" file. You can do this as follows. First use the "Record" button to start a new macro. The key for this macro might be set as Shift-option-control-Z. Call the macro something like "plain". Then hit return (or click in "Record"). Then press option-delete (or option-backspace) to bring up the Macro Description window. Click on open and open the key-bindings file "Microsoft Word (keys)". Click on the upper left of the screen to bring up the stop recording window and click "Stop". Now define various <escape>-char sequences. Return to the "Meta" file of key bindings. Use the "Record" button to start a new macro. Use the "F" key. Call it "forward-word". After starting to record this macro, press option-6 (on the keypad). Click at the top left to bring up the "End of recording" window. Click on "Misc" and then on "Jump to a Macro". Click to indicate Shift-Option-Control and enter z and <return>. Then click on "Stop". Go to the "Microsoft Word (keys)" window to define escape so as to take you to the "Meta" key bindings. Use the "Record" button to start a new macro. Call the key "<esc>" for example. You will be asked to hit the relevant key. Then press option-delete (or option-backspace depending on your keyboard) to bring up the Macro Description window. Click on open and open the key bindings file "Meta".) Click on the upper left of the screen to bring up the stop recording window and click "Stop". If you want to define sequences beginning with ^X, you need to set up a third file of bindings, called something like "C-x". Define "pause" as in the "Meta" bindings. Then define the relevant continuation bindings in "C-x", remembering that each should end by jumping to the pause macro (Shift-Option-Control-Z). Finally, in the "Microsoft Word (keys)" window, define ^X to open the third file, using the same procedure as above. The response to many of these commands is a bit slow, but at last it is possible to use your emacs bindings in Word. -- Gilbert Harman Princeton University Cognitive Science Laboratory 221 Nassau Street, Princeton, NJ 08542 ghh@princeton.edu HARMAN@PUCC.BITNET