# Module: montage/composer/key-composer

### Requires

- module:montage/core/core
- module:montage/composer/composer

### Classes

KeyComposer

### Members

#### (inner) createKey

Constructs a `KeyComposer` to listen for a key combination on a component. The composer will only respond to key events triggered by the DOM elements inside its component or when its component is set as the `activeTarget`.

Source:
  - composer/key-composer.js, line 280

### Methods

#### (inner) createGlobalKey() → {Object}

Constructs a `KeyComposer` listening for a key combination anywhere on the page. The composer will respond to key events that bubble up to the `window`.

##### Parameters:

Name | Type | Description
--- | --- | ---
`component.` | Object | The component to attach the keyComposer to.
`keys.` | Object | The key sequence.
`identifier.` | Object | The identifier.

Source:
  - composer/key-composer.js, line 320

##### Returns:

the newly created KeyComposer Object

Type
  Object

#### (inner) defaultKeyManager() → {Object}

Return either the default `KeyManager` or its `KeyManagerProxy`.

Source:
  - composer/key-composer.js, line 92

##### Returns:

`KeyManager` or `KeyManagerProxy`.

Type
  Object

#### (inner) registerKey()

Register a `KeyComposer` with the default `KeyManager`.

##### Parameters:

Name | Type | Description
--- | --- | ---
`keyComposer.` | Object | A key composer object.

Source:
  - composer/key-composer.js, line 46

#### (inner) unregisterKey()

Unregister a `KeyComposer` with the default `KeyManager`.

##### Parameters:

Name | Type | Description
--- | --- | ---
`keyComposer.` | Object | A key composer object.

Source:
  - composer/key-composer.js, line 77