Skip to content

Conversation

@notkainoa
Copy link
Contributor

@notkainoa notkainoa commented Jan 17, 2026

Mapped Shift+Enter to Ctrl+J in CLI agent terminals so Shift+Enter inserts a new line. Applies only to agent terminal view.

Fixes #636.


📝 Technical Details

Files Changed

  • src/renderer/terminal/TerminalSessionManager.ts
  • src/renderer/terminal/terminalKeybindings.ts (new)
  • src/renderer/terminal/SessionRegistry.ts
  • src/renderer/components/TerminalPane.tsx
  • src/renderer/components/ChatInterface.tsx
  • src/renderer/components/MultiAgentTask.tsx
  • src/test/renderer/TerminalSessionManager.test.ts (new)

Feature: Keyboard Mapping

  • Adds CTRL_J_ASCII and shouldMapShiftEnterToCtrlJ() in terminalKeybindings.ts
  • Attaches a custom key handler in TerminalSessionManager when the flag is set
  • Sends Ctrl+J (LF) to the PTY and bypasses xterm’s default handling for Shift+Enter

Test Coverage

  • Verifies Shift+Enter → Ctrl+J mapping logic
  • Confirms CTRL_J_ASCII value

Copilot AI and others added 11 commits January 16, 2026 02:08
Co-authored-by: notkainoa <123281048+notkainoa@users.noreply.github.com>
…nstant

Co-authored-by: notkainoa <123281048+notkainoa@users.noreply.github.com>
Co-authored-by: notkainoa <123281048+notkainoa@users.noreply.github.com>
Co-authored-by: notkainoa <123281048+notkainoa@users.noreply.github.com>
- Add !this.disposed check before ptyInput to prevent race condition
- Add comprehensive test coverage for keyboard mapping logic
- Tests verify Shift+Enter mapping and edge cases with modifiers

Co-authored-by: notkainoa <123281048+notkainoa@users.noreply.github.com>
@vercel
Copy link

vercel bot commented Jan 17, 2026

@notkainoa is attempting to deploy a commit to the General Action Team on Vercel.

A member of the Team first needs to authorize it.

@notkainoa notkainoa changed the title Map Shift+Enter to Ctrl+J in Agent Map Shift+Enter to Ctrl+J in Agent View Jan 17, 2026
@notkainoa notkainoa changed the title Map Shift+Enter to Ctrl+J in Agent View Map Shift+Enter to Ctrl+J Jan 17, 2026
@notkainoa notkainoa changed the title Map Shift+Enter to Ctrl+J Map Shift+Enter to newline Jan 17, 2026
Resolved merge conflicts combining:
- mapShiftEnterToCtrlJ feature (HEAD) for CLI agent terminals
- disableSnapshots and onLinkClick features (origin/main) for multi-chat support

Conflicts resolved in:
- ChatInterface.tsx
- TerminalPane.tsx
- SessionRegistry.ts
- TerminalSessionManager.ts

Co-Authored-By: Claude <noreply@anthropic.com>
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.

[bug]: can't input line break in Claude Code

1 participant