# `MingaEditor.Input.Interrupt`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/input/interrupt.ex#L1)

Ctrl-G interrupt handler. First handler in the input stack.

Intercepts Ctrl-G (codepoint 7) and resets the editor to a known-good
state. This is Minga's equivalent of Emacs's `C-g`: it cancels
whatever is in progress and returns the user to normal mode in the
editor scope.

Sits before every other handler (including ConflictPrompt) so it
works even when a modal overlay is swallowing all input. This is the
last resort for focus confusion freezes where the editor is running
but keys go to the wrong place.

## What gets reset

- `keymap_scope` → `:editor`
- Vim mode → `:normal` with fresh mode state
- Picker → closed
- Which-key popup → dismissed
- Conflict prompt → dismissed
- Completion menu → closed
- Status message → cleared
- Agent pending prefix → cleared

A `*Messages*` log entry records what was reset for debuggability.

# `state`

```elixir
@type state() :: MingaEditor.Input.Handler.handler_state()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
