Customizing key bindings

Key bindings allow you to map editor commands to your choice of shortcut keys. VisualAge for Java provides two standard sets of key bindings. You can choose to use a standard set, modify a standard set, or create your own set of key bindings in the Options notebook.

To open the Options notebook, select Options from the Window menu, which appears on all IDE windows.  The Options notebook contains settings for each of the customizable features. Expand the General option and select Key Bindings. The settings that appear on the Key Bindings pane are set to default VisualAge for Java values. The other default profile is an Emacs standard that contains a subset of Emacs functionality.  To select this standard, open the Profile list and select Emacs.

Whether you use a standard or a modified profile, you may find it helpful to keep a list of key bindings near your keyboard.  To print the list of key bindings, select the desired profile in the Profile list and click Print Table.

Modifying a profile for key bindings
You may want to modify some of the key bindings from a selected profile to suit your work style or environment. To modify key bindings:

  1. Open the Options notebook, as described above.
  2. In the Key Bindings pane, find the action that you want to modify in the Action list and select its corresponding key sequence.
  3. Enter a new sequence by pressing the keys on your keypad.  If you add more than one key sequence for an action, the sequences are separated with a comma.
  4. Click Apply to save your changes or Defaults to return to the original default bindings for the current profile.
  5. Click OK to close the window.

A warning dialog box opens if you try to set more than one action to a key sequence.

To remove a key binding from an action:

  1. Find the action the you want to modify in the Action list and select its corresponding key sequence.
  2. Press Delete.
  3. Click Apply to save your changes or Defaults to return to the original default bindings for the current profile.
  4. Click OK to close the window.

Note that you can not rebind the Delete key alone to any action, but you can bind an action to a combination of keys that include Delete, for example Ctrl+Delete.

Creating a new profile for key bindings
If you do not want to change a standard profile, for example if you are working on a shared machine, you can create your own personal profile. 

  1. Click Add.  A dialog opens.
  2. Enter a name for your profile.
  3. Select a base model for your profile.
  4. Click OK. Your new profile will appear in the list of profiles.

Note that VisualAge for Java IDE menu accelerator keys, when they are available, take precedence over the user-defined key bindings.  For example, in the Workbench, Alt+S is the menu accelerator key for the Selected menu; you could choose to set Alt+S as the key binding for another action (for example undo), but then you would have to press Esc, then S, to use that key binding for undo when you are in the Workbench window. (The Esc key acts as a "sticky" substitute for the Alt key.)