---
url: /api/@ufo-soft/caelus/keybindings/interfaces/Keybindings.md
---
# Interface: Keybindings

Defined in: [keybindings.ts:144](https://github.com/ufo-soft/caelus/blob/31cc32fc3d2008e3b0d484d65d10bba2a91a5897/packages/caelus/src/keybindings.ts#L144)

## Properties

### table

> `readonly` **table**: [`Table`](../type-aliases/Table.md)

Defined in: [keybindings.ts:146](https://github.com/ufo-soft/caelus/blob/31cc32fc3d2008e3b0d484d65d10bba2a91a5897/packages/caelus/src/keybindings.ts#L146)

The current resolved table. Replaced wholesale on a successful reload, never mutated.

## Methods

### attach()

> **attach**(`target?`): () => `void`

Defined in: [keybindings.ts:148](https://github.com/ufo-soft/caelus/blob/31cc32fc3d2008e3b0d484d65d10bba2a91a5897/packages/caelus/src/keybindings.ts#L148)

Adds the keydown listener; returns the detach.

#### Parameters

##### target?

[`KeyTarget`](../type-aliases/KeyTarget.md)

#### Returns

() => `void`

***

### reload()

> **reload**(): `Promise`<[`Outcome`](../../core/type-aliases/Outcome.md)<[`Table`](../type-aliases/Table.md)>>

Defined in: [keybindings.ts:150](https://github.com/ufo-soft/caelus/blob/31cc32fc3d2008e3b0d484d65d10bba2a91a5897/packages/caelus/src/keybindings.ts#L150)

Re-reads the source and swaps the table. On failure the previous table stays and the reason is returned.

#### Returns

`Promise`<[`Outcome`](../../core/type-aliases/Outcome.md)<[`Table`](../type-aliases/Table.md)>>
