# useHotkeysContext

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

```ts
function useHotkeysContext(): HotkeysContextValue | null;
```

Defined in: [HotkeysProviderContext.ts:212](https://github.com/TanStack/hotkeys/blob/main/packages/vue-hotkeys/src/HotkeysProviderContext.ts#L212)

The nearest context, or `null`. Outside a component, such as in a bare
`effectScope`, there is no context to read, so this skips `inject` and its
warning.

## Returns

`HotkeysContextValue` \| `null`
