Skip to content

Translate LF→CR on PTY input to match real keyboard behavior#2

Open
nickottocode wants to merge 1 commit intomasterfrom
update/enter-to-CR
Open

Translate LF→CR on PTY input to match real keyboard behavior#2
nickottocode wants to merge 1 commit intomasterfrom
update/enter-to-CR

Conversation

@nickottocode
Copy link

TUIs in raw mode expect CR (0x0d) for Enter, which is what physical keyboards send. API clients naturally send LF (0x0a). This adds server-side translation in the PTY writer loop, matching tmux's approach. Safe for cooked mode since ICRNL converts CR back to LF.

  TUIs in raw mode expect CR (0x0d) for Enter, which is what physical
  keyboards send. API clients naturally send LF (0x0a). This adds
  server-side translation in the PTY writer loop, matching tmux's
  approach. Safe for cooked mode since ICRNL converts CR back to LF.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant