[Bug] VSCode Extension: Keyboard Shortcuts Broken on MacOS

Status Closed — not planned
Maintainer reply None cached
Activity 11 comments · opened Sep 25, 2025 · closed Feb 28, 2026

Bug Description
command + arrows no longer work. This is specically in Claude Code extension in vscode. When using the claude command via terminal it works as expected. There are also other key shortcuts that do not work, like Shift + Enter for new line (Macos). This is new, and updating to latest version did not solve it

Environment Info

  • Platform: darwin
  • Terminal: cursor
  • Version: 1.0.124
  • Feedback ID: 202c6517-6b35-4364-8a79-28fadfc0b4a5

View original on GitHub ↗

11 Comments

github-actions[bot] · 11 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/1718
  2. https://github.com/anthropics/claude-code/issues/935
  3. https://github.com/anthropics/claude-code/issues/7958

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

travisbotello · 11 months ago

I can reproduce this. It stopped working after upgrading to macOS Tahoe

dticson · 11 months ago

doesn't even work in a GitHub Codespace with Claude and new 2.0 extension installed.

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

marmot1123 · 7 months ago

Additional data point: Emacs keybindings partially broken in VSCode extension

I'm experiencing a similar issue with Emacs-style cursor movement keybindings in the Claude Code VSCode extension on macOS.

Environment

  • macOS (Darwin 25.1.0)
  • VSCode with Claude Code extension
  • Also tested: iTerm2 with Claude Code CLI

Issue

In the VSCode extension's input field, the following Emacs keybindings do not work:

  • Ctrl+F (forward-char)
  • Ctrl+P (previous-line)

However, these Emacs keybindings do work:

  • Ctrl+B (backward-char)
  • Ctrl+N (next-line)
  • Ctrl+A (beginning-of-line)
  • Ctrl+E (end-of-line)

What I tried

I added the following to my keybindings.json to override VSCode's default bindings (Find and Quick Open), but it had no effect:

{
    "key": "ctrl+f",
    "command": "-actions.find"
},
{
    "key": "ctrl+p",
    "command": "-workbench.action.quickOpen"
},
{
    "key": "ctrl+f",
    "command": "cursorRight",
    "when": "textInputFocus"
},
{
    "key": "ctrl+p",
    "command": "cursorUp",
    "when": "textInputFocus"
}

Works fine in terminal

All Emacs cursor movement keybindings (Ctrl+F/B/P/N/A/E) work correctly when using Claude Code CLI in iTerm2. This suggests the issue is specific to the VSCode extension's webview input handling.

algesten · 7 months ago

I have the same problem. I can't hide my VSCode if the cursor is in the Claude chat box. If the cursor is in a regular code view, it works correctly. It's like Claude VSCode plugin is "hijacking" all keystrokes.

pzelnip · 7 months ago

I'm finding a similar problem, if I have a Claude Code tab open and in view (even if not focused), the keyboard shortcut for toggling the integrated VS Code terminal between full height & partial height (ctrl+~ on a Mac) seems to be hijacked by Claude Code and puts focus into the input box in Claude Code instead of toggling the integrated terminal.

If I don't have a Claude Code tab in view, then the shortcut for toggling integrated terminal works as expected.

hyuga-abe · 7 months ago

Workaround for Emacs keybindings (Ctrl+P/N/F/B) in VSCode webview

For those experiencing issues with Ctrl+P/F not working in the Claude Code VSCode extension input field, you can use Karabiner-Elements to remap these keys to arrow keys specifically for VSCode.

Add this rule to your ~/.config/karabiner/karabiner.json under profiles[0].complex_modifications.rules:

{
    "description": "VSCode: Ctrl+P/N/F/B to arrow keys",
    "manipulators": [
        {
            "conditions": [
                {
                    "bundle_identifiers": ["com.microsoft.VSCode"],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "p",
                "modifiers": { "mandatory": ["control"] }
            },
            "to": [{ "key_code": "up_arrow" }],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": ["com.microsoft.VSCode"],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "n",
                "modifiers": { "mandatory": ["control"] }
            },
            "to": [{ "key_code": "down_arrow" }],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": ["com.microsoft.VSCode"],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "f",
                "modifiers": { "mandatory": ["control"] }
            },
            "to": [{ "key_code": "right_arrow" }],
            "type": "basic"
        },
        {
            "conditions": [
                {
                    "bundle_identifiers": ["com.microsoft.VSCode"],
                    "type": "frontmost_application_if"
                }
            ],
            "from": {
                "key_code": "b",
                "modifiers": { "mandatory": ["control"] }
            },
            "to": [{ "key_code": "left_arrow" }],
            "type": "basic"
        }
    ]
}

Note: This remaps these keys for all of VSCode, so Ctrl+P will no longer open Quick Open (use Cmd+P instead) and Ctrl+F will no longer open Find (use Cmd+F instead).

See also: #21137 for detailed investigation of this issue.

github-actions[bot] · 6 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

pzelnip · 6 months ago

Still an issue.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.