# useHotkeys

Source: /tuil/docs/reference/packages/hotkeys/api/use-hotkeys
Locale: en

function exported by @mwillbanks/tuil-hotkeys.



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

## function [#function]

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

```ts
export function useHotkeys(
  bindings: Readonly<Record<string, HotkeyBinding["handler"]>>,
  options: Omit<HotkeyBinding, "keys" | "handler"> = {},
): void;
```

## Members [#members]

This declaration has no public members.

## Parameters [#parameters]

| Member     | Type                                                 | Required | Description                                                                            | Related types                                                          |
| ---------- | ---------------------------------------------------- | -------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| `bindings` | `Readonly<Record<string, HotkeyBinding["handler"]>>` | Yes      | Supplies the `bindings` value as `Readonly<Record<string, HotkeyBinding["handler"]>>`. | [`HotkeyBinding`](/tuil/docs/reference/packages/hotkeys/api/hotkey-binding) |
| `options`  | `Omit<HotkeyBinding, "keys" \| "handler">`           | No       | Supplies the `options` value as `Omit<HotkeyBinding, "keys" \| "handler">`.            | [`HotkeyBinding`](/tuil/docs/reference/packages/hotkeys/api/hotkey-binding) |

## Returns [#returns]

`void` — Returns a value that satisfies `void`.

Related types: —

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`HotkeyBinding`](/tuil/docs/reference/packages/hotkeys/api/hotkey-binding)

## 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)
