summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/useKeypress.ts
diff options
context:
space:
mode:
authorSijie Wang <[email protected]>2025-07-25 15:36:42 -0700
committerGitHub <[email protected]>2025-07-25 22:36:42 +0000
commitfbdc8d5ab3f76aef32af6a8f516d97771c56a7ac (patch)
tree2167cd9ab4c5a1378d466e735bc41e167ea4d904 /packages/cli/src/ui/hooks/useKeypress.ts
parentaa71438684dd0350acf62fc01d1e6244fd4d3f51 (diff)
Vim mode (#3936)
Diffstat (limited to 'packages/cli/src/ui/hooks/useKeypress.ts')
-rw-r--r--packages/cli/src/ui/hooks/useKeypress.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/cli/src/ui/hooks/useKeypress.ts b/packages/cli/src/ui/hooks/useKeypress.ts
index d3e3df5c..6c2b7e8f 100644
--- a/packages/cli/src/ui/hooks/useKeypress.ts
+++ b/packages/cli/src/ui/hooks/useKeypress.ts
@@ -147,12 +147,15 @@ export function useKeypress(
let rl: readline.Interface;
if (usePassthrough) {
- rl = readline.createInterface({ input: keypressStream });
+ rl = readline.createInterface({
+ input: keypressStream,
+ escapeCodeTimeout: 0,
+ });
readline.emitKeypressEvents(keypressStream, rl);
keypressStream.on('keypress', handleKeypress);
stdin.on('data', handleRawKeypress);
} else {
- rl = readline.createInterface({ input: stdin });
+ rl = readline.createInterface({ input: stdin, escapeCodeTimeout: 0 });
readline.emitKeypressEvents(stdin, rl);
stdin.on('keypress', handleKeypress);
}