← Back to context Comment by 1718627440 13 hours ago That's because C-J IS ANSI Carriage Return. It's basically the absence of any special treatment. 5 comments 1718627440 Reply duskwuff 9 hours ago In fact, without some fairly new (and poorly supported) extensions, it's impossible for an application running in a terminal to distinguish between ^J and a "real" press of the return key. The same goes for tab vs. ^I, Esc vs. ^[, and so on. dotancohen 1 hour ago Claude Code does distinguish between the two. Pressing the Enter key submits the query, pressing ^J inserts a newline. 1718627440 19 minutes ago That's maybe, because (I was wrong and) it's LF, but pressing return produces CR, which is differentiable by an application. JdeBP 11 hours ago You meant ASCII Line Feed, ne? 1718627440 9 hours ago Yes, shame on me. Should have conducted ascii(7) before making bold statements. Oct Dec Hex Char Oct Dec Hex Char ──────────────────────────────────────────────────────────────────────── 000 0 00 NUL '\0' (null character) 100 64 40 @ 001 1 01 SOH (start of heading) 101 65 41 A 002 2 02 STX (start of text) 102 66 42 B 003 3 03 ETX (end of text) 103 67 43 C 004 4 04 EOT (end of transmission) 104 68 44 D 005 5 05 ENQ (enquiry) 105 69 45 E 006 6 06 ACK (acknowledge) 106 70 46 F 007 7 07 BEL '\a' (bell) 107 71 47 G 010 8 08 BS '\b' (backspace) 110 72 48 H 011 9 09 HT '\t' (horizontal tab) 111 73 49 I 012 10 0A LF '\n' (new line) 112 74 4A J 013 11 0B VT '\v' (vertical tab) 113 75 4B K 014 12 0C FF '\f' (form feed) 114 76 4C L 015 13 0D CR '\r' (carriage ret) 115 77 4D M
duskwuff 9 hours ago In fact, without some fairly new (and poorly supported) extensions, it's impossible for an application running in a terminal to distinguish between ^J and a "real" press of the return key. The same goes for tab vs. ^I, Esc vs. ^[, and so on. dotancohen 1 hour ago Claude Code does distinguish between the two. Pressing the Enter key submits the query, pressing ^J inserts a newline. 1718627440 19 minutes ago That's maybe, because (I was wrong and) it's LF, but pressing return produces CR, which is differentiable by an application.
dotancohen 1 hour ago Claude Code does distinguish between the two. Pressing the Enter key submits the query, pressing ^J inserts a newline. 1718627440 19 minutes ago That's maybe, because (I was wrong and) it's LF, but pressing return produces CR, which is differentiable by an application.
1718627440 19 minutes ago That's maybe, because (I was wrong and) it's LF, but pressing return produces CR, which is differentiable by an application.
JdeBP 11 hours ago You meant ASCII Line Feed, ne? 1718627440 9 hours ago Yes, shame on me. Should have conducted ascii(7) before making bold statements. Oct Dec Hex Char Oct Dec Hex Char ──────────────────────────────────────────────────────────────────────── 000 0 00 NUL '\0' (null character) 100 64 40 @ 001 1 01 SOH (start of heading) 101 65 41 A 002 2 02 STX (start of text) 102 66 42 B 003 3 03 ETX (end of text) 103 67 43 C 004 4 04 EOT (end of transmission) 104 68 44 D 005 5 05 ENQ (enquiry) 105 69 45 E 006 6 06 ACK (acknowledge) 106 70 46 F 007 7 07 BEL '\a' (bell) 107 71 47 G 010 8 08 BS '\b' (backspace) 110 72 48 H 011 9 09 HT '\t' (horizontal tab) 111 73 49 I 012 10 0A LF '\n' (new line) 112 74 4A J 013 11 0B VT '\v' (vertical tab) 113 75 4B K 014 12 0C FF '\f' (form feed) 114 76 4C L 015 13 0D CR '\r' (carriage ret) 115 77 4D M
1718627440 9 hours ago Yes, shame on me. Should have conducted ascii(7) before making bold statements. Oct Dec Hex Char Oct Dec Hex Char ──────────────────────────────────────────────────────────────────────── 000 0 00 NUL '\0' (null character) 100 64 40 @ 001 1 01 SOH (start of heading) 101 65 41 A 002 2 02 STX (start of text) 102 66 42 B 003 3 03 ETX (end of text) 103 67 43 C 004 4 04 EOT (end of transmission) 104 68 44 D 005 5 05 ENQ (enquiry) 105 69 45 E 006 6 06 ACK (acknowledge) 106 70 46 F 007 7 07 BEL '\a' (bell) 107 71 47 G 010 8 08 BS '\b' (backspace) 110 72 48 H 011 9 09 HT '\t' (horizontal tab) 111 73 49 I 012 10 0A LF '\n' (new line) 112 74 4A J 013 11 0B VT '\v' (vertical tab) 113 75 4B K 014 12 0C FF '\f' (form feed) 114 76 4C L 015 13 0D CR '\r' (carriage ret) 115 77 4D M
In fact, without some fairly new (and poorly supported) extensions, it's impossible for an application running in a terminal to distinguish between ^J and a "real" press of the return key. The same goes for tab vs. ^I, Esc vs. ^[, and so on.
Claude Code does distinguish between the two. Pressing the Enter key submits the query, pressing ^J inserts a newline.
That's maybe, because (I was wrong and) it's LF, but pressing return produces CR, which is differentiable by an application.
You meant ASCII Line Feed, ne?
Yes, shame on me. Should have conducted ascii(7) before making bold statements.