wagoodman/dive · error
no keybinding configured for '%s'
Error message
no keybinding configured for '%s'
What it means
Thrown by the key-binding generator when a BindingInfo has an empty Config.Keys slice — i.e. the user's keybinding configuration (dive.yaml keybindings section) defined an action with no key assigned. Every bindable action must map to at least one parsed keybinding.Key.
Source
Thrown at cmd/dive/cli/internal/ui/v1/key/binding.go:30
Modifier gocui.Modifier
Config Config
OnAction func() error
IsSelected func() bool
Display string
}
type Binding struct {
key []keybinding.Key
displayName string
selectedFn func() bool
actionFn func() error
}
func GenerateBindings(gui *gocui.Gui, influence string, infos []BindingInfo) ([]*Binding, error) {
var result = make([]*Binding, 0)
for _, info := range infos {
if len(info.Config.Keys) == 0 {
return nil, fmt.Errorf("no keybinding configured for '%s'", info.Display)
}
binding, err := newBinding(gui, influence, info.Config.Keys, info.Display, info.OnAction)
if err != nil {
return nil, err
}
if info.IsSelected != nil {
binding.RegisterSelectionFn(info.IsSelected)
}
if len(info.Display) > 0 {
result = append(result, binding)
}
}
return result, nil
}
View on GitHub (pinned to d6c691947f)
Solutions
- Find the named action in the error message and give it a valid key in dive.yaml, e.g. 'ctrl+f'.
- Remove the entry entirely instead of leaving it empty if you want the default key.
- Validate config keys against the current dive docs for your version.
- As a last resort, delete the keybindings section to restore all defaults.
Example fix
# before (dive.yaml)
keybinding:
filetree:
toggle-added: [] # -> no keybinding configured for 'Toggle Added Files'
# after
keybinding:
filetree:
toggle-added: ctrl+a Defensive patterns
Strategy: validation
Validate before calling
# verify every configured keybinding is non-empty before launch yq -r '.keybinding | .. | select(type == "!!seq") | length' dive.yaml | grep -q '^0$' && echo "empty keybinding found" && exit 1 || true
Prevention
- Never leave a keybinding entry empty; remove it to use defaults.
- Lint dive.yaml for empty sequences in the keybinding section.
- Version-control your dive config and review diffs that empty out keys.
When it happens
Trigger: A dive.yaml keybindings entry like 'filetree-toggle-added: []' or an action key set to an empty string/empty list, causing Config.Setup() to leave Keys empty and GenerateBindings to reject it at startup.
Common situations: Hand-edited keybinding config with a blank value; migrating an old config format that used different key names; intentionally 'unbinding' an action by emptying it (unsupported — dive requires a key).
Related errors
- failed to parse key %q: %w
- failed to unmarshal CI config file %s: %w
- unable to determine image source from %q: %v
- failed to read CI config file %s: %w
- controller failed update: %w
AI-assisted analysis of wagoodman/dive@d6c691947f (2026-08-15).
Data as JSON: /api/errors/1bc54a7edde67f40.
Report an issue: GitHub.