Commit 68d9462
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
2 files changed
Lines changed: 417 additions & 9 deletions
0 commit comments