FAQ How do I create my own key-binding configuration?
On the Workbench > Keys preference page, you can choose the active key-binding configuration. These configurations specify the keyboard shortcuts to use for the various tools, actions, and editor features in Eclipse. By default, the platform includes a standard configuration and an emacs configuration. There are no APIs for defining key-binding configurations programmatically, but you can create them in a plug-in by using the org.eclipse.ui.commands extension point. First, you need to define your configuration:
<keyConfiguration name="My Configuration" parent="org.eclipse.ui.defaultAcceleratorConfiguration" description="This is a simple configuration" id="org.eclipse.faq.sampleConfiguration"> </keyConfiguration>
By specifying a parent, you are saying that your configuration should inherit key bindings from the parent unless they are explicitly set in your configuration. When key bindings are defined, they will refer to the configuration they belong to. If you write your own configuration, youll also need to define new key bindings for all the commands that you want to belong to your configuration.
This FAQ was originally published in Official Eclipse 3.0 FAQs. Copyright 2004, Pearson Education, Inc. All rights reserved. This text is made available here under the terms of the Eclipse Public License v1.0.