# keymap/lookup
Resolve a binding at keypress time: try the requested mode first, then fall back to the `"default"` mode. This is the consumer-side lookup apps should use, so `:vi`/`:emacs` sections only need to hold deltas.
## Syntax
[keymap/lookup "app" "mode" "chord"]
## Parameters
- `app` — app name (string or keyword)
- `mode` — active mode, e.g. `"vi"` (string or keyword); `"default"` skips the fallback step
- `chord` — canonical chord string (string or keyword)
## Examples
[keymap/lookup "editor" "vi" "ctrl-s"] # → "cmd-save" [keymap/lookup "editor" "zzz" "ctrl-s"] # → "cmd-save" — falls back to "default" [keymap/lookup "log" "default" "f"] # → "cycle-filter"
## Returns
Command string, or `nil` when unbound in both the requested mode and `"default"`. `%Err{:message}` when an argument is missing or not a string/keyword.
## See Also
`keymap/get`, `keymap/modes`, `keymap/chord`