There is a shortcut conflict in the Cursor IDE that prevents the terminal from being cleared using Cmd+K. Instead of clearing the terminal, it opens the AI assistance chat window. This issue disrupts workflow, especially for users accustomed to clearing the terminal frequently.
Environment:
IDE: Cursor IDE
Operating System: macOS
Python environment: pyenv with multiple virtual environments (see attached screenshot for details)
Just a note that CTRL+L clears the visible pane but not the whole scroll-back history as is the case with CMD+K. In a way it’s better if you don’t want to lose your previous commands/output in the terminal.
For folks looking to just have Ctrl+l work in their terminal as usual (clear terminal without losing scrollback buffer) while retaining the Ctrl+l functionality for opening up a chat window while coding on a file, you can add the following to your Keyboard Shortcuts (JSON) settings:
Agreed. ctrl+L clears the terminal but doesn’t clear the scrollback buffer. cmd+k is the default keybind to also clear scrollback buffer. Having cmd+k firing up the Terminal: generate in terminal is a very bad UX choice and should be set as a different keybind.
As a workaround, from the Keyboard shortcuts settings, look for Terminal: generate in terminal and bind it to something else (I used cmd+g cmd+t chord, as in (g)enerate in (t)erminal).
I am on macOS, and in my case ctrl+L clears both the terminal and scrollback buffer, but I want to keep the buffer! I have not touched the keyboard shortcut settings at all. Why is this? Any advice or settings to change?
The cmd+k hot key clears the buffer scrollback even during a command execution. Its a feature integrated in the modern terminals.
In the other hand, ctrl+l is a shell feature that clear the screen by moving the prompt up and cannot be used during a running command, for example when following a log file.
The point here is that Cursor binded a combination that is conflicting with another previously defined by vscode.
C’mon, Cmd+K is the default shortcut in MacOS for clearing any terminal. Cursor’s terminal is the ONLY terminal I know which thinks it’s super smart to ignore this rule.
Furthermore, if you press the ellipsis button on the right – guess what you see in the menu: it’s “Clear Terminal (Cmd + K)”! No way, so it was supposed to work like this when it was forked from VS Code, oh wow
So please don’t tell me to use Ctrl + L instead, as it contradicts the conventional UX of the whole OS.