{"record":{"id":"336571dbde1ffe37","repo":"junegunn/fzf","slug":"unsupported-key-key","errorCode":null,"errorMessage":"unsupported key: ${key}","messagePattern":"unsupported key: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/options.go","lineNumber":1314,"sourceCode":"\t\t\t\tswitch r {\n\t\t\t\tcase escapedColon:\n\t\t\t\t\tr = ':'\n\t\t\t\tcase escapedComma:\n\t\t\t\t\tr = ','\n\t\t\t\tcase escapedPlus:\n\t\t\t\t\tr = '+'\n\t\t\t\t}\n\t\t\t\tevt := tui.AltKey(r)\n\t\t\t\tchords[evt] = key\n\t\t\t\tlist = append(list, evt)\n\t\t\t} else if len(key) == 2 && strings.HasPrefix(lkey, \"f\") && key[1] >= '1' && key[1] <= '9' {\n\t\t\t\tadd(tui.EventType(tui.F1.Int() + int(key[1]) - '1'))\n\t\t\t} else if len(runes) == 1 {\n\t\t\t\tevt := tui.Key(runes[0])\n\t\t\t\tchords[evt] = key\n\t\t\t\tlist = append(list, evt)\n\t\t\t} else {\n\t\t\t\treturn nil, list, errors.New(\"unsupported key: \" + key)\n\t\t\t}\n\t\t}\n\t}\n\treturn chords, list, nil\n}\n\nfunc parseEveryEvent(arg string) (tui.Event, error) {\n\tsecs, err := strconv.ParseFloat(strings.TrimSpace(arg), 64)\n\tif err != nil || math.IsNaN(secs) || math.IsInf(secs, 0) || secs <= 0 {\n\t\treturn tui.Event{}, errors.New(\"every() requires a positive number of seconds\")\n\t}\n\tif secs < 0.01 {\n\t\tsecs = 0.01\n\t}\n\tms := math.Round(secs * 1000)\n\tif ms > math.MaxInt32 {\n\t\treturn tui.Event{}, errors.New(\"every() interval is too large\")\n\t}","sourceCodeStart":1296,"sourceCodeEnd":1332,"githubUrl":"https://github.com/junegunn/fzf/blob/bd4efa277b49ef34ca4025bff9b1a288e1980eff/src/options.go#L1296-L1332","documentation":"The last fallback in parseKeyChords: a comma-separated key list for --bind, --expect, --multi-bind etc. tokenizes each name into alt- combos, F1–F9 single-char forms, and single runes. Any token that is none of those — a multi-character name the switch above did not recognize — falls through to 'unsupported key: <key>'.","triggerScenarios":"--bind 'ctrl-f2:...' style tokens not handled, unrecognized names like --expect 'ctrl-a,spacebar', 'home' on versions lacking it, 'shift-tab' written where 'btab' is expected, or key names with trailing whitespace from multiline --bind strings.","commonSituations":"Bind scripts targeting newer/older fzf key vocabularies (e.g. 'pos' or 'jump' actions vs keys); copy-pasted wiki examples for a different version; Windows/macOS terminal-specific names not portable to the Linux build.","solutions":["Consult fzf --help for the exact key names (ctrl-*, alt-*, f1-f12, shift-up/down, btab, tab, enter, space, bs, del, home, end, pgup, pgdn, up, down, left, right)","Fix spelling: 'btab' not 'shift-tab', 'alt-z' not 'altz'","Remove stray whitespace and empty tokens between commas","Upgrade fzf if the key was added in a newer release (e.g. focus events in 0.35+)"],"exampleFix":"# before\nfzf --bind 'shift-tab:up'\n# after\nfzf --bind 'btab:up'","handlingStrategy":"validation","validationCode":"KEYS='ctrl-a,btab,f3'\nIFS=',' read -ra KS <<< \"$KEYS\"\nfor k in \"${KS[@]}\"; do\n  [[ \"$k\" =~ ^(ctrl|alt|shift)-(a-z|0-9|f1-f12|up|down|left|right|enter|space|tab|btab|del|home|end|pgup|pgdn|bs)$ ]] || { echo \"unsupported key: $k\" >&2; exit 1; }\ndone\nfzf --bind \"ctrl-a:accept\" --expect \"$KEYS\"","typeGuard":"isValidFzfKey() { [[ \"$1\" =~ ^(ctrl-|alt-|shift-)?[a-z0-9]+$ || \"$1\" =~ ^(f[1-9]|f1[0-2]|tab|btab|enter|space|bs|del|home|end|pgup|pgdn|up|down|left|right|left-click|right-click|scroll-up|scroll-down|double-click)$ ]]; }","tryCatchPattern":null,"preventionTips":["Diff your bind vocabulary against fzf --help after every upgrade","Prefer canonical names (btab, not shift-tab; alt-z, not escape+z)","Generate --bind lists from a validated key->action map instead of free-text strings"],"tags":["fzf","keybindings","options-parsing","go"],"backgroundTag":null,"analyzedSha":"bd4efa277b49ef34ca4025bff9b1a288e1980eff","analyzedAt":"2026-08-15T06:11:46.983Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}