kovidgoyal/kitty · error
No action specified for shortcut
Error message
No action specified for shortcut %s
What it means
After consuming any flags, ParseMap splits the remainder into key spec and action at the first space. If there is no space, no action was given and it errors echoing the whole remaining string.
Solutions
- Append the action after the key spec
- If flags are present, make sure they didn't swallow the action (see errors 625/627)
Example fix
# before map ctrl+a # after map ctrl+a neighboring_window left
Defensive patterns
Strategy: validation
Validate before calling
if !strings.Contains(val, " ") { return fmt.Errorf("map directive missing action: %q", val) } Prevention
- Every map line needs key-spec AND action tokens
- Lint config map lines in CI
When it happens
Trigger: `map ctrl+a` or `map ctrl+a1` in a config file — a key spec with no action after it.
Common situations: Truncated line during editing, or forgetting that the action is a separate token; also happens when flag parsing consumed the action by mistake.
Understand the failure class
Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.
Related errors
- Failed to parse map = %#v with error
- Invalid allow-fallback value %#v, allowed values: shifted…
- No key specified after flag
- No key specified after
- Unknown map option
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/b211cdfc9295aea8.
Report an issue: GitHub.
Appendix: source
Thrown at tools/config/utils.go:321
}
if err := validateAllowFallback(value); err != nil {
return nil, err
}
if value == "none" {
allow_fallback = ""
} else {
allow_fallback = value
}
rest = strings.TrimSpace(after)
default:
return nil, fmt.Errorf("Unknown map option: %s", flag)
}
}
val = rest
}
spec, action, found := strings.Cut(val, " ")
if !found {
return nil, fmt.Errorf("No action specified for shortcut %s", val)
}
action = strings.TrimSpace(action)
action_name, action_args, _ := strings.Cut(action, " ")
action_args = strings.TrimSpace(action_args)
return &KeyAction{Name: action_name, Args: action_args, Normalized_keys: NormalizeShortcuts(spec), AllowFallback: allow_fallback}, nil
}
type partialMatch struct {
action *KeyAction
priority int
}
type ShortcutTracker struct {
partial_matches []partialMatch
partial_num_consumed int
}
func (self *ShortcutTracker) Match(ev *loop.KeyEvent, all_actions []*KeyAction) *KeyAction {View on GitHub (pinned to 6d5d0c4406)