{"record":{"id":"b211cdfc9295aea8","repo":"kovidgoyal/kitty","slug":"no-action-specified-for-shortcut-s","errorCode":null,"errorMessage":"No action specified for shortcut %s","messagePattern":"No action specified for shortcut (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"tools/config/utils.go","lineNumber":321,"sourceCode":"\t\t\t\t}\n\t\t\t\tif err := validateAllowFallback(value); err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tif value == \"none\" {\n\t\t\t\t\tallow_fallback = \"\"\n\t\t\t\t} else {\n\t\t\t\t\tallow_fallback = value\n\t\t\t\t}\n\t\t\t\trest = strings.TrimSpace(after)\n\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"Unknown map option: %s\", flag)\n\t\t\t}\n\t\t}\n\t\tval = rest\n\t}\n\tspec, action, found := strings.Cut(val, \" \")\n\tif !found {\n\t\treturn nil, fmt.Errorf(\"No action specified for shortcut %s\", val)\n\t}\n\taction = strings.TrimSpace(action)\n\taction_name, action_args, _ := strings.Cut(action, \" \")\n\taction_args = strings.TrimSpace(action_args)\n\treturn &KeyAction{Name: action_name, Args: action_args, Normalized_keys: NormalizeShortcuts(spec), AllowFallback: allow_fallback}, nil\n}\n\ntype partialMatch struct {\n\taction   *KeyAction\n\tpriority int\n}\n\ntype ShortcutTracker struct {\n\tpartial_matches      []partialMatch\n\tpartial_num_consumed int\n}\n\nfunc (self *ShortcutTracker) Match(ev *loop.KeyEvent, all_actions []*KeyAction) *KeyAction {","sourceCodeStart":303,"sourceCodeEnd":339,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/tools/config/utils.go#L303-L339","documentation":"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.","triggerScenarios":"`map ctrl+a` or `map ctrl+a1` in a config file — a key spec with no action after it.","commonSituations":"Truncated line during editing, or forgetting that the action is a separate token; also happens when flag parsing consumed the action by mistake.","solutions":["Append the action after the key spec","If flags are present, make sure they didn't swallow the action (see errors 625/627)"],"exampleFix":"# before\nmap ctrl+a\n# after\nmap ctrl+a neighboring_window left","handlingStrategy":"validation","validationCode":"if !strings.Contains(val, \" \") { return fmt.Errorf(\"map directive missing action: %q\", val) }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Every map line needs key-spec AND action tokens","Lint config map lines in CI"],"tags":["config","map","missing-action","kitty"],"backgroundTag":"config-missing-value","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}