micro-editor / micro-editor/micro

`\u001b[` sequence bound to `AbortCommand` is a no-op

Open
#3,383 1 comment 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

I have CommandMode bound to ctrl` on macOS and would like CommandMode to be toggleable, à la "Toggle Terminal" shortcut in VS Code.

I tried binding it to CommandMode|Escape, thinking that CommandMode would fail if it was already active, but that doesn't seem to work.

But explicit is better, so maybe the best way is to introduce a CommandModeToggle action.

Per the below reply, I tried binding AbortCommand. However, it seems like binding any \u001b sequence to AbortCommand in the command context does nothing when pressed. It does work with a "normal" keybind like Ctrl-[letter].

Environment
  • Version: 2.0.15
  • OS: macOS Seequoia 15.7.5
  • Terminal: Ghostty 1.3.1

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 binding on macOS with Ghostty, comparing an ESC sequence bound to AbortCommand with a normal Ctrl-letter binding. Trace how command-context escape input is handled; done means the configured ESC sequence invokes AbortCommand while the existing normal key binding continues to work.

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.