Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

FAQ How do I create my own key-binding configuration?

Revision as of 16:27, 14 March 2006 by Claffra (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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, you&#146;ll also need to define new key bindings for all the commands that you want to belong to your configuration.


See Also:

FAQ_How_do_I_provide_a_keyboard_shortcut_for_my_action?


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.

Back to the top