Command-K and the terminal

  1. Press Command + Shift + P (to open Command Palette)
  2. Search: “Keyboard Shortcuts (JSON)”
  3. 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"
  }
]
5 Likes