* Added Overview page * Revised Getting Started page * Minor revision * Edited readme, minor modifications to docs * Removed sweep.yaml, .devcontainer, .ergomake * Moved security.md to .github, added contributing.md * changes as per code review * updated contributing.md * fixed broken links & added missing links in doc, improved structure * fixed link in wsl setup * fixed server link, added https cloning in yarn-setup
24 lines
552 B
Plaintext
24 lines
552 B
Plaintext
---
|
|
title: Hotkeys
|
|
sidebar_position: 11
|
|
sidebar_custom_props:
|
|
icon: TbKeyboard
|
|
---
|
|
|
|
You can intercept any hotkey combination and execute a custom action.
|
|
|
|
We added a thin wrapper on top of [react-hotkeys-hook](https://react-hotkeys-hook.vercel.app/docs/intro) to make it more performant and to avoid unnecessary re-renders.
|
|
|
|
We also created a wrapper hook `useScopedHotkeys` to make it easy to manage scopes.
|
|
|
|
```ts
|
|
useScopedHotkeys(
|
|
'ctrl+k,meta+k',
|
|
() => {
|
|
openCommandMenu();
|
|
},
|
|
AppHotkeyScope.CommandMenu,
|
|
[openCommandMenu],
|
|
);
|
|
```
|