CMD + K vs CMD + R Keyboard shortcuts default

By any chance is there some kind of quick way to change the Cursor CMD + K’s to CMD + R’s and vice-versa?

CMD + K is the default for many things in VSCode.

Ty!

2 Likes

There is a way actually! You can change workbench.action.keychord.leader.

3 Likes

Thanks @arvid220u ! Once I changed that I was able to switch the few Cursor commands to CMD + R instead. I think it was an odd choice to not have that be the default since CMD + K is the norm in vscode.

1 Like

@tommulkins Could you share your changes to keybindings.json that achieved this?

I added the following:

  {
    "key": "cmd+k",
    "command": "workbench.action.keychord.leader",
  },
  {
    "key": "cmd+r",
    "command": "aipopup.action.modal.generate"
  }

but with that config saved, when i press cmd+k to start a keychord, I immediately see a modal pop up saying: “Go to the keyboard shortcut settings and change the value of workbench.action.keychord.leader to change the keychord leader keybinding”

Figured it out. You can’t do this directly in keybindings.json. You have to actually go to the Keybindings UI based Settings and set the workbench.action.keychord.leader to cmd+k. I then also set cmd+r to aipopup.action.modal.generate.

Here are all those changes: Switch Cursor.sh cmd+k and cmd+r to approximate VSCode — paste.sr.ht
Those are probably all of these listed commands: Keybindings - Cursor

One funny bug is now below the integrated terminal, it no longer says “⌘K to generate a command”, but rather it says “undefined to generate a command”

hey @natemwilson - Sorry I didn’t see this until now.

I went into Keyboard Shortcuts and changed the keychord.leader from there.

1 Like

Changing workbench.action.keychord.leader just saved me a lot of time… thank you!!

Breaking all key chords was a bad move… I’m surprised they haven’t fixed this yet.

2 Likes

This is why I made the extension:

4 Likes

Thanks for your response!
I really want to give Cursor a fair shot, but that cmd+k overwrite was really holding me back.
I swapped them, I’m ok with learning a new command for cursor, but don’t want to learn a new command for everything else.

I think it would be a good idea if they could add that as a setting!

Redefining workbench.action.keychord.leader is a huge improvement, but there’s still one broken thing: in classic VS Code, when I’m in the terminal, cmd+k clears the terminal. Currently it waits for a second chording key to be pressed. :frowning:

I ended up using the extension that someone posted, just to avoid a bunch of custom keybindings, and I then rebound terminal-clearing gestures to cmd+k cmd+k … I’m willing to accept that one small customization (which I will also make in Code so that I can switch between them as I continue to evaluate).

thanks, amazing - popularity of this extension should also be a signal to cursor devs.

Insane to overwrite the most used key combination, thanks for the help.

2 Likes