# HotkeyDispatchContext

Source: /tuil/docs/reference/packages/hotkeys/api/hotkey-dispatch-context
Locale: en

interface exported by @mwillbanks/tuil-hotkeys.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-hotkeys`.

```ts
export interface HotkeyDispatchContext {
  readonly activeScopes?:
    | Partial<Record<HotkeyScope, string | true>>
    | (() => Partial<Record<HotkeyScope, string | true>>);
  readonly platform?: NodeJS.Platform;
  readonly onError?: (error: unknown) => void;
  readonly allowApplication?: boolean;
}
```

## Members [#members]

| Member             | Type                                                                                                                | Required | Description                                                                                                                                                      | Related types                                                      |
| ------------------ | ------------------------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| `activeScopes`     | `Partial<Record<HotkeyScope, string \| true>> \| (() => Partial<Record<HotkeyScope, string \| true>>) \| undefined` | No       | The `activeScopes` member uses the `Partial<Record<HotkeyScope, string \| true>> \| (() => Partial<Record<HotkeyScope, string \| true>>) \| undefined` contract. | [`HotkeyScope`](/tuil/docs/reference/packages/hotkeys/api/hotkey-scope) |
| `platform`         | `NodeJS.Platform \| undefined`                                                                                      | No       | The `platform` member uses the `NodeJS.Platform \| undefined` contract.                                                                                          | —                                                                  |
| `onError`          | `((error: unknown) => void) \| undefined`                                                                           | No       | The `onError` member uses the `((error: unknown) => void) \| undefined` contract.                                                                                | —                                                                  |
| `allowApplication` | `boolean \| undefined`                                                                                              | No       | The `allowApplication` member uses the `boolean \| undefined` contract.                                                                                          | —                                                                  |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`HotkeyScope`](/tuil/docs/reference/packages/hotkeys/api/hotkey-scope)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/hotkeys/src/index.ts)

## Package [#package]

[@mwillbanks/tuil-hotkeys](/tuil/docs/reference/packages/hotkeys)
