Seems like the new version changed some cmd+k mapping logic. can’t find it documented anywhere, just mentioned in the release notes.
I used to have a nice mapping that changed the integrated terminal’s cmd+k to cmd+shift+k so that I could use cmd+k to clear the terminal like in vanilla vscode. but this mapping seems to have broken in the latest version of cursor. anyone know how to fix?
Mapping file that just stopped working:
// 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"
},
{
"key": "cmd+k",
"command": "composer.startComposerPrompt",
"when": "composerIsEnabled && !terminalFocus"
},
{
"key": "cmd+k",
"command": "-composer.startComposerPrompt",
"when": "composerIsEnabled"
},
{
"key": "cmd+i",
"command": "composerMode.agent"
}
]
1 Like
kleosr
(Mario)
April 24, 2025, 6:59pm
2
Hey there
@ramicaza that must be extremely annoying to be dealing with, try with the options below and see if that solves your situation.
Check this thread about the remapping:
This Github issue can be useful too:
Are you using GTK, GNOME, XFCE any Distro in specific?
Workaround:
[
{
"key": "shift+cmd+k",
"command": "cursorai.action.generateInTerminal",
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported"
},
{
"key": "cmd+k",
"command": "workbench.action.terminal.clear",
"when": "terminalFocus && terminalHasBeenCreated"
},
{
"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"
},
{
"key": "cmd+i",
"command": "composerMode.agent"
}
]
2 Likes
Hey that did it! thanks a ton. To answer your question, I’m on macOS.
Seems like previously, it was sufficient to do the - to remove the default cursor cmd+k behavior, probs falling back on the default vscode shortcut. but based on your change it is now necessary to explicitly clear on cmd+k.
Thanks again.
1 Like
kleosr
(Mario)
April 24, 2025, 8:21pm
4
Glad it worked! Thanks for the macOS context—good to know it’s a pleasure happy to know that now works for you.
best regards,
kleosr
Thanks for sharing it. This default behaviour where cmd+k doesn’t clean the terminal was driving me nuts!