Skip to content

macOS: Backspace on image attachment token deletes char-by-char instead of whole tokenΒ #3105

@idanshimon

Description

@idanshimon

Summary

On macOS, pressing Backspace on an image attachment token (e.g. [πŸ“Ž copilot-image-14c299.png]) in the input removes one character at a time. On Windows, pressing Backspace removes the entire token at once β€” a much better UX.

Steps to Reproduce

  1. macOS only
  2. Copy an image to clipboard (e.g. screencapture -c /dev/null)
  3. In the Copilot CLI, press Ctrl+V to attach the image (or use the Windows-native behavior)
  4. Press Backspace once

Expected: Entire token [πŸ“Ž copilot-image-xxxxx.png] is removed
Actual: One character is removed from the end of the token

Root Cause

On macOS, Backspace sends \x7f (DEL, ASCII 127). The CLI's token-boundary deletion logic appears to only activate on Windows-specific key sequences, not on the \x7f byte macOS terminals emit.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:input-keyboardKeyboard shortcuts, keybindings, copy/paste, clipboard, mouse, and text input

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions