6.1 Changing Key Assignments

PWB maps actions (functions and macros) to keys. You can assign any of these actions to keys other than the default keys.

For example, Exit is a PWB function. Its default key assignment is F8. A BRIEF user may prefer to use ALT+X to leave the editor.

·To make ALT+X execute the Exit function:

1.From the Options menu, choose Key Assignments.

PWB displays the Key Assignments dialog box.

2.Select Exit in the Macro/Function List box, or type exit in the Macro/ Function Name text box.

3.Move the cursor to the New Key box between the braces ({}) by clicking between the braces or by pressing ALT+K.

4.Press ALT+X.

PWB types ALT+X in the text box after the braces and displays the name of the macro or function that ALT+X is currently assigned to. With the default settings, you can see that ALT+X is assigned to the Unassigned function. Pressing a key in the key box is a quick way to find out the name of the function assigned to the key.

Note :

When the cursor is in the key box (between the braces), most keys lose their usual meaning, including ESC, F1, and the dialog box access keys. The key you press is interpreted as the key to be assigned. Only TAB, SHIFT+TAB, ENTER, and NUMENTER retain their usual meaning. To assign one of these keys, type the name of the key in the text box.

5.Press TAB to move the cursor out of the key box.

6.Choose Assign.

PWB assigns Exit to the ALT+X key. Note that Exit is still assigned to the F8 key. Functions can be assigned to many keys.

7.Choose OK.

Important:

To change a key, you must choose the Assign button. The OK button dismisses only the dialog box. It does not perform any other action. This design allows you to assign many keys in one session with the dialog box.

The change remains in effect for the duration of the session.

·To make a permanent key assignment:

1.From the Options menu, choose Key Assignments.

2.Choose Save.

PWB displays the Save Key Assignments dialog box, which lists all of the unsaved assignments that you have made during the PWB session by using the Key Assignments dialog box.

3.Delete any settings that you do not want to save.

4.Choose OK.

PWB writes your new settings into the [PWB] section of TOOLS.INI for subsequent sessions. When you exit PWB, you are prompted to save TOOLS.INI. Your changes are not permanent until you actually save the file to disk.

If you already know the function name, you can make a quick assignment for the current session by using the Assign function instead of going through the Key Assignments dialog box.

·To assign a key using the Assign function:

Execute the function sequence:

Arg function : key Assign (ALT+A function : key ALT+=).

For example, to assign Exit to ALT+X:

1.Press ALT+A to execute Arg.

2.Type exit:ALT+X

3.Press ALT+= to execute Assign.

The assignment is in effect for the rest of the PWB session.

The key assignments you make by using the Assign function are not listed in the Save Key Assignments dialog box.

To discover the name of the function or macro that is currently assigned to a key, use the Key Assignments dialog box (as previously described) or use the Tell function.

·To find a current key assignment using Tell:

1.Press CTRL+T to execute Tell.

PWB displays the prompt:

2.Press the key you want to find out about.

If you press F10, PWB displays the function assigned to the F10 key (Openfile).

The Tell function has many other uses in addition to displaying key assignments. For more information on Tell, see page 216.