Skip to content

Add ⌘K Clear to Start for the integrated terminal - #2186

Closed
Borisserz wants to merge 1 commit into
CodeEditApp:mainfrom
Borisserz:feature/891-terminal-clear-to-start
Closed

Add ⌘K Clear to Start for the integrated terminal#2186
Borisserz wants to merge 1 commit into
CodeEditApp:mainfrom
Borisserz:feature/891-terminal-clear-to-start

Conversation

@Borisserz

@Borisserz Borisserz commented Jul 29, 2026

Copy link
Copy Markdown

Description

Adds the standard macOS terminal shortcut ⌘K to CodeEdit’s integrated terminal.

When the terminal view is focused and the setting is enabled (default), ⌘K clears both the visible buffer and the scrollback. Nothing is sent to the shell — only the emulator buffer is cleared, same idea as Terminal.app and VS Code.

Also adds a Clear to Start with ⌘K toggle under Terminal Settings so it can be turned off if needed.

Related Issues

Checklist

  • I read and understood the contributing guide as well as the code of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

Screenshots

N/A — no UI layout changes beyond a new Terminal Settings toggle. Behavior is keyboard-only in the terminal.

Test plan

  • Unit tests for setting defaults / decode and clearToStart() clearing viewport + scrollback
  • Manual: focus terminal → produce output → ⌘K → screen and scrollback cleared
  • Manual: disable Clear to Start with ⌘K in settings → ⌘K does not clear
  • Manual: ⌘K only while terminal is focused (does not affect editor)

Made with Cursor

When the terminal is focused, ⌘K clears the screen and scrollback, like
Terminal.app. There's a setting to turn it off; it stays on by default.
@Borisserz
Borisserz force-pushed the feature/891-terminal-clear-to-start branch 2 times, most recently from 370fbed to 6111cf4 Compare July 29, 2026 11:10
@Borisserz

Copy link
Copy Markdown
Author

Closing to resubmit with a cleaned-up commit (author attribution).

@Borisserz Borisserz closed this Jul 29, 2026
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.

✨ Add "Clear To Start" (⌘K) shortcut to integrated terminal

1 participant