Skip to content

Commit 68d9462

Browse files
committed
fix(cli): Ctrl+J now correctly inserts newline in multiline input
Terminals translate Ctrl+J to a linefeed character (0x0a) with name "linefeed" and ctrl=false. The original code checked for key.ctrl && key.name === "j" which never matched. Fix: Detect Ctrl+J by checking for lowerKeyName === "linefeed" as the primary detection method, with fallback to raw ctrl+j for terminals that pass it through. Also adds comprehensive unit tests for newline keyboard shortcuts.
1 parent 2dbaab1 commit 68d9462

File tree

2 files changed

+417
-9
lines changed

2 files changed

+417
-9
lines changed

0 commit comments

Comments
 (0)