Rational Developer for System z, Version 7.6

Keyboard Customization

You can easily customize the function of the keyboard for all available plug-ins in Eclipse. To customize the keyboard functions, select Windows® -> Preferences ->General -> Keys . The Keys preferences page is displayed allowing you to assign key strokes and key sequences to invoke particular commands offered by the various plug-ins. Host Connection provides several standard commands such as [attn], [clear], [enter], [newline], and [pf1]-[pf24] . Each of these standard commands can be assigned to key sequences. The following topics explain how keyboard customization is implemented in Eclipse.

Key Strokes, Key Sequences, and Key Bindings

A key stroke is the act of pressing a key and including any of the modifier keys such as Ctrl, Alt, Shift, or Command. For example,Ctrl+S is the key stroke obtained by holding down the Ctrl key and pressing the S key. Similarly S is the key stroke obtained by simply pressing the S key. A key sequence is an ordered set of one or more key strokes. Finally, a key binding is the assignment of a key sequence to a particular command. You can view and modify all key bindings using the Keys preference page in Eclipse.

Schemes, Categories, and Contexts

A Scheme is a set of bindings. Eclipse includes a Default scheme and the Emacs scheme which extends the Default scheme. The Default scheme contains a general set of common key sequences for well-known commands. Similarly, the Emacs scheme contains a set of key bindings familiar to users of Emacs.

A Category is a way of grouping commands. For example Text Editing is a category in Eclipse. For the Host Connect feature a Host Connect category is defined. All commands available for the Host Connect feature are listed under the Host Connect category.

A Context defines the active part of Eclipse at a given time. Key bindings can vary based on the current context of Eclipse. Sometimes the active part can be a Java™ editor and at other times it can be the Host Connection Emulator. For example, in most contexts the F1 key launches the Eclipse Help view but the Host Connection Emulator context overrides this behavior and sends the [pf1] command to the host. You can view the Scheme, Category, and Context that you want by clicking the View and Modify tabs of the Keys preference page, respectively.

Viewing and Modifying Key Bindings

All key bindings can be viewed and modified from the Keys preference page. Key bindings are viewed in table format with columns for the Category, Command, Key Sequence, and When (Context). The table can be sorted by any of these values. The Host Connect plug-in has default key bindings to override existing Eclipse key bindings (such as F1).

The View page of the Keys preference page displays the set of defined key bindings. To access the View page, select the View tab on the Keys preference page.

Use the Modify page of the Keys preference page to customize the set of key bindings. To access the Modify page, select the Modify tab on the Keys preference page.

The View and Modify pages of the Keys preference page show how key bindings are customized. In the first section titled Command, you can select the Scheme, Category, and Name field values for the command using the first three combination boxes. If the command you selected has any existing key bindings, they are listed in the Assignments table indicating the context or when the key binding is applicable and the key sequence that activates the command. The lower section of the Modify page titled Key Sequence is used to add or remove key bindings from the set of assignments for the currently selected scheme, category, and command. The Name text field in this section is used to input the desired key sequence. The text field is specially modified to display a human-readable sequence of key strokes. The Assignments table indicates all key bindings that are currently set for the given key sequence.

To remove a key binding, do the following:
  1. Enter a key sequence in the Name field.
  2. Select a command listed in the Assignments table.
  3. Click Remove.

You can undo the operation by clicking Restore.

To add a key binding:
  1. Select the desired scheme, category, and command using the Scheme, Category, and Name combination boxes, respectively. Select the Default scheme and the Host Connect category to view the available set of commands for the Host Connect plug-in.
  2. Enter a key sequence in the Name field.
  3. Select a context from the When combination box. Select In Host Connection Emulator for the Host Connect plug-in.
  4. Click Add.

The new key sequence should be seen in the Assignments table of the Command section for the currently selected scheme, category, and command.

More information about using the Keys preference page can be found in the Eclipse help documentation.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)