It’s driving me nuts that command-k, the standard for clearing the terminal scroll back, opens the AI tools. Like, I get it that you’ve standardized on that for your tools, and that’s great, but you also didn’t change the shortcut to clear terminal scroll back.
This is really important for me as well. I’m so used to Command+K and it’s a crucial part in my workflow. It’s really uncomfortable for me to change this habit, of clearing the terminal without Command+K.
Same. Driving me nuts. There are other bindings too, like CMD + SHIFT + L which would otherwise select all other instances of the current selection. I don’t want to have to remap my mind for this.
- another… This is bad. I have tried to remap the keys as stated Cmd K hotkey conflict - #2 by arvid220u , and still have that composer pops up. I am about to stop the subscription…
Not having this disrupted my flow, so I’m retraining with control+L to clear the terminal
I was able to prevent the composer by adding the !terminalFocus condition to the composer.startComposerPrompt shortcut.
So following overrides work for me (cursorai.action.generateInTerminal is now shift+cmd+k)
{
"key": "shift+cmd+k",
"command": "cursorai.action.generateInTerminal",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "cmd+k",
"command": "-cursorai.action.generateInTerminal",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "cmd+k",
"command": "composer.startComposerPrompt",
"when": "composerIsEnabled && !terminalFocus"
},
{
"key": "cmd+k",
"command": "-composer.startComposerPrompt",
"when": "composerIsEnabled"
}
@rsngr Wow you are an angel! Thanks a lot!
<3 <3 <3
Should it? Ctrl + L is a shortcut to start a new chat. What does it have to do with the terminal? Or perhaps you meant something else?
You are a god among humans
I love you!
Better than AI, thanks for this snippet!! ![]()
Oh thank f*** this was driving me nuts, too. Cursor devs, please rethink this default. Cmd+K is one of the most used terminal shortcuts, at least in my workflow.
Did this ‘fix’ break in the latest update?
Changed when to:
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalPromptBarVisible || terminalProcessSupported && terminalPromptBarVisible"
It seems to be working now.
It seriously kicked me out of flow today as Command K didn’t clear terminal
… but this fix worked for me in the latest version
- Press Command + Shift + P (to open Command Palette)
- Search: “Keyboard Shortcuts (JSON)”
- Upload the following JSON content in the keybindings.json file
// Place your key bindings in this file to override the defaults
[
{
"key": "shift+cmd+k",
"command": "cursorai.action.generateInTerminal",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "cmd+k",
"command": "-cursorai.action.generateInTerminal",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported || terminalHasBeenCreated && terminalPromptBarVisible || terminalProcessSupported && terminalPromptBarVisible"
},
{
"key": "cmd+k",
"command": "composer.startComposerPrompt",
"when": "composerIsEnabled && !terminalFocus"
},
{
"key": "cmd+k",
"command": "-composer.startComposerPrompt",
"when": "composerIsEnabled"
}
]
Thank you for the update!
The fact this is still an issue that requires manual override is nuts…
@firrae thanks for the bump, as there are many shortcuts overlapping between apps, OS and tools, this is a bit tricky. Does the change of ‘when’ case narrowing down the shortcut help for your case? I’ve forwarded the feature request to Cursor Team.