Package org.eclipse.e4.ui.model.application.commands

# Interface MKeyBinding

All Superinterfaces:
  `MApplicationElement`, `MKeySequence`

All Known Implementing Classes:
  `KeyBindingImpl`

public interface MKeyBinding extends MApplicationElement, MKeySequence
A representation of the model object 'Key Binding'.

Keybindings map a particular keyboard sequence (i.e. Ctrl + C for Copy...) onto some command.

Since:
  1.0
Restriction:
  This interface is not intended to be implemented by clients.

  The following features are supported:

  - `Command`
  - `Parameters`

## Method Summary

Modifier and Type
Method
Description
`MCommand`
`getCommand()`
Returns the value of the 'Command' reference.
`List<MParameter>`
`getParameters()`
Returns the value of the 'Parameters' containment reference list.
`void`
`setCommand(MCommand value)`
Sets the value of the '`Command`' reference.

### Methods inherited from interface org.eclipse.e4.ui.model.application.MApplicationElement

`getContributorURI, getElementId, getPersistedState, getTags, getTransientData, setContributorURI, setElementId`

### Methods inherited from interface org.eclipse.e4.ui.model.application.commands.MKeySequence

`getKeySequence, setKeySequence`

## Method Details

### getCommand

MCommand getCommand()
Returns the value of the 'Command' reference.

A reference to the Command to (attempt to) execute if the given key sequence is detected.

Returns:
  the value of the 'Command' reference.
See Also:
  - `setCommand(MCommand)`

### setCommand

void setCommand(MCommand value)
Sets the value of the '`Command`' reference.

Parameters:
  `value` - the new value of the 'Command' reference.
See Also:
  - `getCommand()`

### getParameters

List<MParameter> getParameters()
Returns the value of the 'Parameters' containment reference list. The list contents are of type `MParameter`.

This allows a KeyBinding to provide a particular set of parameters to be used when the Command is to be executed. This allows generic commands like 'Open Part' to have bindings that will open a specific Part...

Returns:
  the value of the 'Parameters' containment reference list.