# API

**Kind**: interface | **Module**: [Hotkeys](https://docs.interop.io/desktop/reference/javascript/hotkeys/index.md) | **Access**: `io.hotkeys`

**Source**: https://docs.interop.io/desktop/reference/javascript/hotkeys/api/index.html

Hotkeys API.

## Methods

### isRegistered

Whether the current app has registered a hotkey.

```ts
(hotkey: string) => boolean
```

**Parameters**

- **`hotkey`** (`string`, required)
  The name of the hotkey you want to check.

**Returns**: `boolean`

### register

Registers a hotkey. All registered hotkeys within the framework must be unique.

```ts
(hotkey: string | HotkeyInfo, callback: HotkeyCallback) => Promise<void>
```

**Parameters**

- **`hotkey`** (`string | HotkeyInfo`, required)
  The key or key combination (as a string or as a `HotkeyInfo` object) that will be registered.
- **`callback`** (`HotkeyCallback`, required)
  Callback function that will be invoked when the hotkey is activated.

**Returns**: `Promise<void>`

### unregister

Unregisters a hotkey. Notifications will no longer be received about this hotkey.

```ts
(hotkey: string) => Promise<void>
```

**Parameters**

- **`hotkey`** (`string`, required)
  The hotkey to unregister.

**Returns**: `Promise<void>`

### unregisterAll

Unregisters all hotkeys registered by the current app.

```ts
() => Promise<void>
```

**Returns**: `Promise<void>`

## Related types

- [HotkeyCallback](https://docs.interop.io/desktop/reference/javascript/hotkeys/hotkeycallback/index.md)
- [HotkeyInfo](https://docs.interop.io/desktop/reference/javascript/hotkeys/hotkeyinfo/index.md)
