Skip to content

Configurable editing shortcuts (copy/paste/cut) for the Claude Code prompt input #97

Description

@jmoraleda

The prompt input in the Claude Code view (a <textarea id="input"> inside the SWT Browser/WebView2 view, resources/claudegui/claudegui.html) has no editing keyboard shortcuts of its own — copy/cut/paste currently only work because they fall through to the webview's native textarea defaults. There's no way to customize or extend them.

I use Eclipse's "Emacs" key binding Scheme (Window → Preferences → General → Keys), so my muscle-memory editing keys are Alt+W (copy), Ctrl+Y (paste), Ctrl+W (cut). None of these do anything in the prompt input, since — being a webview, not a native SWT widget — it has no connection to the Eclipse workbench's Commands/Contexts/Scheme framework at all; that Scheme setting can't reach it by any means.

From a quick look at the code, I think that maybe one possible approach would be a new entry in ClaudePreferencePage.java (which already exposes several FieldEditor-based settings) passed through to the webview at load time, so #input's existing keydown listener in resources/claudegui/scripts/ui.js (currently handles Enter/Escape/arrow keys only, around line 152) reads copy/cut/paste bindings from that preference.

Env: Linux, Eclipse, "Emacs" key binding Scheme.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions