Skip to content

Option+Backspace (delete word) doesn't work on macOS #2237

@OriginalMHV

Description

@OriginalMHV

Problem

On macOS, Option+Backspace (delete previous word) doesn't work in the Copilot CLI input. This is one of the most common editing shortcuts on macOS -- muscle memory kicks in constantly when editing prompts, and nothing happens.

The same goes for Option+Delete (delete next word). Both work fine in the regular shell prompt, but not inside the Copilot CLI input handler.

Current behavior

Pressing Option+Backspace does nothing (or inserts a garbage character depending on terminal emulator).

Expected behavior

Option+Backspace should delete the previous word, same as Ctrl+W does today. Option+Delete should delete the next word.

Context

I know Ctrl+W exists as a workaround, but every other terminal application on macOS respects Option+Backspace -- iTerm2, Warp, Alacritty, Terminal.app. It's the standard macOS way to delete a word, and having to rewire muscle memory just for this one tool is a constant friction point.

The underlying issue is likely that the input library doesn't map the escape sequence that macOS terminals send for Option+Backspace (\x1b\x7f or \x1b\x08 depending on terminal config).

Environment

  • macOS (Sequoia)
  • Warp terminal (but reproducible in other terminals too)
  • Copilot CLI v1.0.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions