{"record":{"id":"b0877719117f39fc","repo":"kovidgoyal/kitty","slug":"mouse-modes-modes-not-recognized-ignoring","errorCode":null,"errorMessage":"Mouse modes: {modes} not recognized, ignoring","messagePattern":"Mouse modes: (.+?) not recognized, ignoring","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"kitty/options/utils.py","lineNumber":1623,"sourceCode":"        if mods is None:\n            return\n    else:\n        obutton = parts[0].lower()\n        mods = 0\n    try:\n        b = mouse_button_map.get(obutton, obutton)[1:]\n        button = getattr(defines, f'GLFW_MOUSE_BUTTON_{b}')\n    except Exception:\n        log_error(f'Mouse button: {xbutton} not recognized, ignoring')\n        return\n    try:\n        count = mouse_trigger_count_map[event.lower()]\n    except KeyError:\n        log_error(f'Mouse event type: {event} not recognized, ignoring')\n        return\n    specified_modes = frozenset(modes.lower().split(','))\n    if specified_modes - {'grabbed', 'ungrabbed'}:\n        log_error(f'Mouse modes: {modes} not recognized, ignoring')\n        return\n    for mode in sorted(specified_modes):\n        yield MouseMapping(button, mods, count, mode == 'grabbed', definition=action)\n\n\ndef parse_font_spec(spec: str) -> FontSpec:\n    return FontSpec.from_setting(spec)\n\n\nJumpTypes = Literal['start', 'end', 'none', 'both']\n\n\nclass EasingFunction(NamedTuple):\n    type: Literal['steps', 'linear', 'cubic-bezier', ''] = ''\n\n    num_steps: int = 0\n    jump_type: JumpTypes = 'end'\n","sourceCodeStart":1605,"sourceCodeEnd":1641,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L1605-L1641","documentation":"The modes field of a mouse_map line must be a comma-separated subset of {'grabbed','ungrabbed'}. Anything else causes the mapping to be ignored.","triggerScenarios":"'mouse_map left click both ...' or modes containing 'grabbed, foo'.","commonSituations":"Expecting modes like 'always' or 'all'; trailing commas introducing empty tokens after splitting; typos like 'ungrabed'.","solutions":["Use only 'grabbed', 'ungrabbed', or 'grabbed,ungrabbed'.","Remove trailing commas and stray spaces/tokens.","Example: mouse_map left click grabbed,ungrabbed ..."],"exampleFix":"# before\nmouse_map left click always paste\n\n# after\nmouse_map left click grabbed,ungrabbed paste","handlingStrategy":"validation","validationCode":"def valid_mouse_modes(modes: str) -> bool:\n    return set(modes.lower().split(',')) <= {'grabbed','ungrabbed'}","typeGuard":"def is_mode_list(modes: str) -> bool:\n    toks = set(modes.lower().split(','))\n    return toks and toks <= {'grabbed','ungrabbed'}","tryCatchPattern":null,"preventionTips":["Only grabbed/ungrabbed; combine as 'grabbed,ungrabbed'","Avoid trailing commas"],"tags":["kitty","config","mouse","mouse-map"],"backgroundTag":"config-value-validation-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}