[FEATURE] Keyboard shortcut to toggle IDE context sharing

Resolved 💬 2 comments Opened Mar 13, 2026 by matzkoh Closed Apr 10, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When Claude Code is connected to an IDE (VS Code, Cursor, etc.), the current editor selection is automatically sent as context with every prompt. There is no quick way to toggle this on/off during a session.

The only option is the /ide slash command, which requires typing and interrupts flow. I often want IDE context off to avoid sending irrelevant selections, but occasionally need to quickly enable it to reference a specific selection — then disable it again. The /ide command is too slow for this back-and-forth.

This is distinct from the persistence request in #1703 — that issue is about remembering the setting across sessions. This is about rapid runtime toggling within a single session.

Proposed Solution

Add a keybinding action (e.g., app:toggleIdeContext) that can be:

  1. Bound to a custom keyboard shortcut via ~/.claude/keybindings.json
  2. Assigned a sensible default (e.g., Ctrl+I or Meta+I)

Example keybinding config:

[
  {
    "key": "ctrl+i",
    "action": "app:toggleIdeContext"
  }
]

A brief status indicator in the TUI (e.g., "IDE: on/off") would also help confirm the current state.

Alternative Solutions

  • Currently using /ide to toggle, but it requires typing and breaks flow mid-conversation
  • Could disconnect the IDE entirely, but then lose the ability to send selections when needed
  • No existing keybinding action covers this — checked ~/.claude/keybindings.json available actions

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

  1. I'm working in VS Code with Claude Code in the integrated terminal
  2. I have some code selected in the editor, but I want to ask an unrelated question — the selection context is noise
  3. I press Ctrl+I to toggle IDE context off, send my prompt
  4. Next, I select a specific function and want Claude to review it — I press Ctrl+I to toggle back on
  5. This takes <1 second vs typing /ide and selecting options each time

Additional Context

  • Affects both VS Code integrated terminal and standalone terminals (e.g., iTerm2) that auto-connect to the IDE
  • Related issues: #1703 (persistence), #26285 (frequent disconnections making /ide even more painful)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗