{"record":{"id":"ad1300ce99aaf0d3","repo":"kovidgoyal/kitty","slug":"unrecognized-key-in-video-preview-s","errorCode":null,"errorMessage":"unrecognized key in video_preview: %s","messagePattern":"unrecognized key in video_preview: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"kittens/choose_files/main.go","lineNumber":345,"sourceCode":"\t\t}\n\t\tvar i uint64\n\t\tswitch k {\n\t\tcase \"duration\":\n\t\t\tif video_duration, err = strconv.ParseFloat(v, 64); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid %s in video_preview: %s\", k, v)\n\t\t\t}\n\t\tcase \"fps\":\n\t\t\tif i, err = strconv.ParseUint(v, 10, 0); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid %s in video_preview: %s\", k, v)\n\t\t\t}\n\t\t\tvideo_fps = int(i)\n\t\tcase \"width\":\n\t\t\tif i, err = strconv.ParseUint(v, 10, 0); err != nil {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid %s in video_preview: %s\", k, v)\n\t\t\t}\n\t\t\tvideo_width = int(i)\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"unrecognized key in video_preview: %s\", k)\n\t\t}\n\t}\n\treturn ans, nil\n}\n\nfunc (h *Handler) init_sizes(new_size loop.ScreenSize) {\n\th.screen_size.width = int(new_size.WidthCells)\n\th.screen_size.height = int(new_size.HeightCells)\n\th.screen_size.cell_width = int(new_size.CellWidth)\n\th.screen_size.cell_height = int(new_size.CellHeight)\n\th.screen_size.width_px = int(new_size.WidthPx)\n\th.screen_size.height_px = int(new_size.HeightPx)\n\th.rl.ClearCachedScreenSize()\n\th.search_rl.ClearCachedScreenSize()\n}\n\nfunc (h *Handler) OnInitialize() (ans string, err error) {\n\tif sz, err := h.lp.ScreenSize(); err != nil {","sourceCodeStart":327,"sourceCodeEnd":363,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/choose_files/main.go#L327-L363","documentation":"A key in the video_preview setting is not one of the recognized keys (duration, fps, width). kitty rejects unknown keys to catch typos.","triggerScenarios":"--video-preview 'height=24' or 'frame-rate=10' — any key other than duration/fps/width.","commonSituations":"Typos ('duraton'), renamed settings, or assuming other player options are accepted.","solutions":["Remove or correct the key — only duration, fps, width are valid","Check kitty docs for the current video_preview keys"],"exampleFix":"# before\n--video-preview 'fps=10,height=24'\n# after\n--video-preview 'fps=10,width=24'","handlingStrategy":"validation","validationCode":"switch k { case \"duration\", \"fps\", \"width\": default: /* reject unknown key */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Spell-check option keys against the docs","Keep configs version-pinned to a known kitty release"],"tags":["kitty","config","video-preview","unknown-key"],"backgroundTag":"config-unknown-option","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}