micro-editor / micro-editor/micro

Binding `\u001bd` is buggy

Open
#3,494 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

Description of the problem or steps to reproduce

I found two different bugs because I was binding \u001bd instead of Alt-d.

VS Code
  1. Bind \u001bd to DeleteWordRight
  2. Open micro in VS Code's integrated terminal and test +Delete (it works)
  3. Open and exit raw mode
  4. Test +Delete again (it writes d instead of performing the action)

If you bind Alt-d instead, this bug doesn't happen.

Ghostty
  1. Bind \u001bd to DeleteWordRight
  2. Open micro in Ghostty, run raw mode, and press +Delete
  3. It outputs EventRaw: d: "\x1bd"

If you bind Alt-d instead, it prints EventKey: Alt-d: "\x1bd".

According to Ghostty's inspector, it is sending Alt-delete as expected.

Specifications

Commit hash: 04c57704
OS: macOS Sequoia 15.1
Terminal: Ghostty

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the VS Code or Ghostty behavior described, comparing the escaped binding \u001bd with Alt-d before and after entering raw mode. Trace the input event handling entry point responsible for distinguishing EventRaw from EventKey; done means the escaped binding consistently triggers DeleteWordRight and is classified like Alt-d.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.