Eclipse Platform
2.1

org.eclipse.ui
Interface IKeyBindingService

All Known Subinterfaces:
INestableKeyBindingService

public interface IKeyBindingService

The key binding service allows one to query or set the scope of Eclipse for the purposes of resolving key assignments to commands, and to register actions to handle specific commands. See the org.eclipse.ui.commands extension point for details.

A participating workbench part is responsible to register all its actions with this service. The part is also responsible to set the current scope.

This interface is not intended to be implemented or extended by clients.

Since:
2.0

Method Summary
 void enable(boolean enable)
          Deprecated.  
 String getActiveAcceleratorConfigurationId()
          Deprecated.  
 String getActiveAcceleratorScopeId()
          Deprecated.  
 String[] getScopes()
          Returns the active accelerator scope ids.
 boolean processKey(KeyEvent event)
          Deprecated.  
 void registerAction(IAction action)
          Registers an action with the key binding service.
 void setActiveAcceleratorScopeId(String scopeId)
          Deprecated.  
 void setScopes(String[] scopes)
          Sets the active accelerator scope ids.
 void unregisterAction(IAction action)
          Unregisters an action with the key binding service.
 

Method Detail

getScopes

public String[] getScopes()
Returns the active accelerator scope ids.
Returns:
the active accelerator scope ids.

setScopes

public void setScopes(String[] scopes)
               throws IllegalArgumentException
Sets the active accelerator scope ids.
Parameters:
ids - the active accelerator scope ids.

registerAction

public void registerAction(IAction action)
                    throws IllegalArgumentException
Registers an action with the key binding service.
Parameters:
action - the action to be registered with the key binding service.

unregisterAction

public void unregisterAction(IAction action)
                      throws IllegalArgumentException
Unregisters an action with the key binding service.
Parameters:
action - the action to be unregistered with the key binding service.

getActiveAcceleratorConfigurationId

public String getActiveAcceleratorConfigurationId()
Deprecated.  

Returns the id of the active accelerator configuration.
Returns:
the id of the active accelerator configuration

getActiveAcceleratorScopeId

public String getActiveAcceleratorScopeId()
Deprecated.  

Returns the id of the active accelerator scope.
Returns:
the id of the active accelerator scope

setActiveAcceleratorScopeId

public void setActiveAcceleratorScopeId(String scopeId)
                                 throws IllegalArgumentException
Deprecated.  

Sets the active accelerator scope id.
Parameters:
scopeId - the new accelerator scope id

processKey

public boolean processKey(KeyEvent event)
Deprecated.  

To be called by an editor upon receiving a key event from its SWT text widget. The key binding service invokes the corresponding action if the key is mapped to an action. The key binding service may also invoke a mode, if the key is the first key in a (multi-key) accelerator key sequence of a registered action. If either of these cases occurs, processKey() returns true. If neither of these cases occurs, nothing happens and processKey() returns false.
Parameters:
event - The key to be processed
Returns:
true if the key was consumed by the key binding service, false if the editor is free to consume the key

enable

public void enable(boolean enable)
Deprecated.  

Enables or Disables this service. The default is false. Registered accelerators have no efect until the service is enabled;

Eclipse Platform
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.