Skip to content

Comments

fix(terminal): support Cmd+Left/Right navigation on macOS#1035

Open
thisisharsh7 wants to merge 1 commit intogeneralaction:mainfrom
thisisharsh7:fix/macos-terminal-cmd-arrow-1031
Open

fix(terminal): support Cmd+Left/Right navigation on macOS#1035
thisisharsh7 wants to merge 1 commit intogeneralaction:mainfrom
thisisharsh7:fix/macos-terminal-cmd-arrow-1031

Conversation

@thisisharsh7
Copy link
Contributor

fixes #1031

@vercel
Copy link

vercel bot commented Feb 22, 2026

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

A member of the Team first needs to authorize it.

@greptile-apps
Copy link

greptile-apps bot commented Feb 22, 2026

Greptile Summary

Adds support for Cmd+Left and Cmd+Right keyboard shortcuts on macOS to navigate to the beginning and end of a line in the terminal. The implementation maps these shortcuts to Ctrl+A (\x01) and Ctrl+E (\x05) respectively, which are standard terminal control sequences for line navigation.

  • Maps Cmd+Left to Ctrl+A (move to beginning of line)
  • Maps Cmd+Right to Ctrl+E (move to end of line)
  • Only active on macOS (IS_MAC_PLATFORM)
  • Requires only the Meta key (Cmd) without Ctrl, Shift, or Alt modifiers
  • Prevents default browser behavior and stops event propagation
  • Follows the same pattern as existing keybindings (Shift+Enter, copy/paste)

Confidence Score: 5/5

  • Safe to merge - small, focused change with proper platform checks and event handling
  • The implementation is straightforward, follows existing patterns in the codebase, and correctly implements platform-specific behavior. The change is well-scoped (19 lines), uses proper event prevention, and maps to standard terminal control sequences.
  • No files require special attention

Important Files Changed

Filename Overview
src/renderer/terminal/TerminalSessionManager.ts Adds Cmd+Left/Right to Ctrl+A/E mapping for macOS terminal line navigation

Last reviewed commit: 5f33c9d

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: Cmd+Arrow keys not working in terminal on macOS

1 participant