Skip to content

Commit bcfd1d4

Browse files
committed
chore: add changeset for updateSettings()
1 parent 366454c commit bcfd1d4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.changeset/kind-llamas-beam.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
"@clack/prompts": minor
3+
"@clack/core": minor
4+
---
5+
6+
Adds a new `updateSettings()` function to support new global keybindings.
7+
8+
`updateSettings()` accepts an `aliases` object that maps custom keys to an action (`up | down | left | right | space | enter | cancel`).
9+
10+
```ts
11+
import { updateSettings } from "@clack/prompts";
12+
13+
// Support custom keybindings
14+
updateSettings({
15+
aliases: {
16+
w: "up",
17+
a: "left",
18+
s: "down",
19+
d: "right",
20+
},
21+
});
22+
```
23+
24+
> [!WARNING]
25+
> In order to enforce consistent, user-friendly defaults across the ecosystem, `updateSettings` does not support disabling Clack's default keybindings.

0 commit comments

Comments
 (0)