Chat eating keybinds?

I have some keybinds setup like so:

{
  "key": "cmd+1",
  "command": "workbench.action.focusSideBar"
},
{
  "key": "cmd+2",
  "command": "workbench.action.focusActiveEditorGroup"
},
{
  "key": "cmd+3",
  "command": "workbench.action.terminal.focus"
},
{
  "key": "cmd+4",
  "command": "workbench.action.focusAuxiliaryBar"
},

These work fine except when I use cmd+4 to focus cursor chat. Once it’s focused, I can’t use my other binds anymore to switch focus. I don’t have any conflicting keybinds. I’m not sure if this is a bug or I’m doing something wrong.

1 Like

That’s because you’re focused on the chat input field, which can block some other keybinds. We will strive to handle this more effectively. Thank you for your report!

You can try pressing the tab key once to unfocus from the input field and then use your other keybinds.

3 Likes

This is still a problem, and one of my biggest complaints with Cursor.

Hey, can you explain exactly what problem you’re having?

When using the “AI Chat” sidebar feature, and the chat input has focus, custom key bindings do not get triggered. For example, I’m trying to set up a custom shortcut that triggers the “View: Close AI Sidebar” command, but it seems the key press is never received (but it does work when the chat input is not focused).

Please reopen this thread

1 Like

This is a big problem for me also. @alaclarson thanks for describing it.

1 Like

+1 Please provide a solution.

VSCode has this solved for the integrated terminal with the commandsToSkipShell setting:

  "terminal.integrated.commandsToSkipShell": [
    "workbench.action.toggleSidebarVisibility",
    "workbench.panel.search.focus",
    "workbench.view.search.focus"
  ],

Yes, this is definitely a major issue. In my case, I want to have keyboard shortcuts that resize the auxiliary bar, like so:

{
    "command": "runCommands",
    "key": "ctrl+shift+alt+[",
    "args": {
      "commands": [
        "workbench.action.focusAuxiliaryBar",
        "workbench.action.increaseViewSize"
      ]
    }
  }

This is my biggest beef with Cursor as well. It’s also a problem with default keyboard shortcuts (not just custom ones). I’m constantly having to press ESC to defocus chat so I can use default shortcuts.

I’ll use Windows shortcuts to demonstrate, but the problem is the same on Mac.

When chat is in focus, I can’t do any of these:

CTRL+1: Focus first editor group
CTRL+2: Focus second editor group
CTRL+`: Focus terminal

Instead, I have to do this:

ESCCTRL+1
ESCCTRL+2
ESCCTRL+`

1 Like

Thanks for the tip that ESC defocuses chat! Now it’s just a tiny annoyance for me (a bit similar to Terminal requiring an extra SHIFT due to CTRL and signals).

FYI, the other editor, W (apparently this forum is censored so I can’t use the name) doesn’t override default vscode shortcuts so it’s much easier to switch back and forth. Even the CTRL+k shortcut works (Cursor replaced it with CTRL+m).