Skip to content

Chat mode: allow holding Space to trigger Claude Code's native voice mode #742

Open

Description

@sergiorademacher

In terminal mode, holding Space reaches the pane and starts Claude Code's built-in voice mode (push-to-talk). In chat mode, the composer keeps every key in the browser, so Claude Code never receives the held Space. The only voice option in chat is the app's own dictation (Ctrl+Shift+Space, BYOK OpenAI).

Expected: an opt-in setting so that holding Space in an empty composer forwards the key to the pane. Claude Code's voice mode then starts, as it does in terminal mode. A tap still types a normal space.

Note: Claude Code records from the host's microphone, so this only helps when the browser runs on the same machine as herdr.

Possible implementation

The input message (shared/protocol.ts) already writes raw text to the pane. In Composer.onKeyDown, behind an opt-in setting and only while the composer is empty:

  • Hold the first Space keydown. When a repeat keydown arrives, forward the held space and each repeat with sendInput(pane, " ") and preventDefault(). Claude Code sees the same auto-repeat stream as in a real terminal, and the end of the stream is the release.
  • On a keyup without a repeat, insert a normal space into the composer.
  • The transcript lands in Claude Code's own input line in the pane. Enter in an empty composer sends "\r" to the pane, as pressEnter does in terminal mode. A small preview of the pane's input line above the composer would let the user read the transcript first.

Version: commit 33f72ce.

Activity

  1. sergiorademacher commented on Oct 22, 2026

    @sergiorademacher
    ContributorAuthor

    A possible implementation is in #1639: an opt-in setting, Space key repeats forwarded to the pane, a tap still types a space, and Enter submits the transcript. It is there so the approach can be judged on real code; close it if the feature is not wanted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions