Skip to content

Map Shift+Enter to newline#657

Closed
notkainoa wants to merge 12 commits intogeneralaction:mainfrom
notkainoa:copilot/map-shift-enter-to-control-j
Closed

Map Shift+Enter to newline#657
notkainoa wants to merge 12 commits intogeneralaction:mainfrom
notkainoa:copilot/map-shift-enter-to-control-j

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

@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 <[email protected]>
@nthomsencph
Copy link

Absolutely essential

@rabanspiegel
Copy link
Contributor

Will be in the next release! Thank you @notkainoa and @nthomsencph 🙏

@rabanspiegel
Copy link
Contributor

Creating a new pr with a rebase of this. The fork makes it a little tricky for me to update effectively. Thanks @notkainoa

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

4 participants