diff options
| author | Sijie Wang <[email protected]> | 2025-07-25 15:36:42 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-25 22:36:42 +0000 |
| commit | fbdc8d5ab3f76aef32af6a8f516d97771c56a7ac (patch) | |
| tree | 2167cd9ab4c5a1378d466e735bc41e167ea4d904 /packages/cli/src/ui/hooks/useKeypress.ts | |
| parent | aa71438684dd0350acf62fc01d1e6244fd4d3f51 (diff) | |
Vim mode (#3936)
Diffstat (limited to 'packages/cli/src/ui/hooks/useKeypress.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/useKeypress.ts | 7 |
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); } |
