{"record":{"id":"e86247b2fb754bc2","repo":"kovidgoyal/kitty","slug":"unknown-value-for-show-hyperlink-targets-x-r","errorCode":null,"errorMessage":"Unknown value for show_hyperlink_targets: {x!r}","messagePattern":"Unknown value for show_hyperlink_targets: (.+?)","errorType":"validation","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"kitty/options/utils.py","lineNumber":708,"sourceCode":"def url_prefixes(x: str) -> tuple[str, ...]:\n    return tuple(a.lower() for a in x.replace(',', ' ').split())\n\n\ndef show_hyperlink_targets(x: str) -> Literal['never', 'always', 'Ctrl', 'Shift', 'Super', 'Alt']:\n    q = x.lower()\n    if q in ('never', 'n', 'no', 'false'):\n        return 'never'\n    if q in ('y', 'yes', 'true', 'always'):\n        return 'always'\n    if q == 'ctrl':\n        return 'Ctrl'\n    if q == 'shift':\n        return 'Shift'\n    if q in ('super', 'cmd'):\n        return 'Super'\n    if q in ('alt', 'meta'):\n        return 'Alt'\n    raise KeyError(f'Unknown value for show_hyperlink_targets: {x!r}')\n\n\ndef copy_on_select(raw: str) -> str:\n    q = raw.lower()\n    # boolean values special cased for backwards compat\n    if q in ('y', 'yes', 'true', 'clipboard'):\n        return 'clipboard'\n    if q in ('n', 'no', 'false', ''):\n        return ''\n    return raw\n\n\ndef window_size(val: str) -> tuple[int, str]:\n    val = val.lower()\n    unit = 'cells' if val.endswith('c') else 'px'\n    return positive_int(val.rstrip('c')), unit\n\n","sourceCodeStart":690,"sourceCodeEnd":726,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L690-L726","documentation":"show_hyperlink_targets raises KeyError when the modifier value is not one of the accepted keys: ctrl, shift, alt/meta, super/cmd. It maps these to modifier names used to reveal hyperlink targets on hover.","triggerScenarios":"show_hyperlink_targets hyper, show_hyperlink_targets mouse, or a typo like 'shft' in kitty.conf.","commonSituations":"Expecting arbitrary modifier strings or 'none'/'yes' booleans; copy-paste from other terminals' hyperlink options.","solutions":["Use one of: ctrl, shift, alt, meta, super, cmd","Disable via show_hyperlink_targets no / removing the line per docs"],"exampleFix":"# before\nshow_hyperlink_targets hyper\n# after\nshow_hyperlink_targets ctrl","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"def is_hyperlink_mod(x: str) -> bool:\n    return x.lower() in {'ctrl','shift','alt','meta','super','cmd'}","tryCatchPattern":null,"preventionTips":["Restrict to documented modifier names","Treat unknown modifiers as config errors early"],"tags":["kitty","config","hyperlinks"],"backgroundTag":"config-value-validation-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}