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

Scope-aware input handler for the active surface handler list.

Runs after modal overlay handlers and before the mode FSM fallback. Resolves
keys through the active keymap scope, handling scope-specific bindings,
prefix sequences, and sub-state dispatch (search input, mention completion).

For the `:editor` scope, keys pass through to the mode FSM unless the agent
side panel is visible, in which case panel-specific handling applies.

For the `:agent` scope, keys are resolved against the agent scope trie.
Context-dependent sub-states (search input, mention completion, tool
approval, diff review) are handled before trie lookup. The leader key
(SPC) always passes through to the mode FSM for which-key integration.

For the `:file_tree` scope, tree-specific keys are handled via scope
resolution and unmatched keys delegate to the mode FSM with the tree
buffer swapped in as the active buffer (providing full vim navigation).

# `state`

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

---

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