{"record":{"id":"5e6eb88db5915309","repo":"stablyai/orca","slug":"unsupported-mouse-button-button","errorCode":null,"errorMessage":"unsupported mouse button: {button}","messagePattern":"unsupported mouse button: (.+?)","errorType":"validation","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"native/computer-use-linux/runtime.py","lineNumber":832,"sourceCode":"        parsed = float(value)\n    except (TypeError, ValueError):\n        raise RuntimeError(f\"{name} must be a positive number\")\n    if not math.isfinite(parsed) or parsed <= 0:\n        raise RuntimeError(f\"{name} must be a positive number\")\n    return parsed\n\n\ndef require_non_empty_string(value, name):\n    if value is None or str(value) == \"\":\n        raise RuntimeError(f\"{name} is required\")\n    return str(value)\n\n\ndef click_at(x, y, button, count, modifiers=None):\n    button = (button or \"left\").lower()\n    buttons = {\"left\": (\"b1p\", \"b1r\"), \"right\": (\"b3p\", \"b3r\"), \"middle\": (\"b2p\", \"b2r\")}\n    if button not in buttons:\n        raise RuntimeError(f\"unsupported mouse button: {button}\")\n    parsed_count = require_positive_integer(1 if count is None else count, \"click_count\")\n    modifier_keys = click_modifier_keys(modifiers)\n    if modifier_keys:\n        modified_click_at(x, y, button, parsed_count, modifier_keys)\n        return\n    down, up = buttons[button]\n    for _ in range(parsed_count):\n        Atspi.generate_mouse_event(round(x), round(y), \"abs\")\n        Atspi.generate_mouse_event(round(x), round(y), down)\n        time.sleep(0.03)\n        Atspi.generate_mouse_event(round(x), round(y), up)\n\n\ndef click_modifier_keys(raw):\n    if raw is None:\n        return []\n    aliases = {\n        \"ctrl\": \"ctrl\", \"control\": \"ctrl\", \"cmdorctrl\": \"ctrl\", \"commandorcontrol\": \"ctrl\",","sourceCodeStart":814,"sourceCodeEnd":850,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/native/computer-use-linux/runtime.py#L814-L850","documentation":"Raised by click_at (runtime.py:832) when the lowercased button string is not one of the supported keys 'left', 'right', 'middle'. The buttons map (runtime.py:830) binds these to AT-SPI mouse press/release event codes (b1/b3/b2). Any other value — including typos or extra buttons — is rejected before any event is synthesized.","triggerScenarios":"Calling the 'click' tool with operation['mouse_button'] set to an unsupported value such as 'back', 'forward', 'fourth', 'LEFT' (case is handled), or a numeric like '4'. Note: when click_count is omitted and modifiers absent and the action is performable via accessibility, click_at may not be reached; but any modifier or multi-click fallback path enforces this.","commonSituations":"An agent tries 'back'/'forward' mouse buttons (unsupported on this backend); a caller sends an integer button index instead of a named string; a typo like 'lef'.","solutions":["Use only 'left', 'right', or 'middle' for mouse_button.","Leave mouse_button unset to default to 'left' (click_at defaults None/or-falsy to 'left' at runtime.py:829).","For back/forward semantics, use keyboard shortcuts (hotkey) instead, since this AT-SPI backend does not expose extra buttons."],"exampleFix":"// before\n{\"tool\":\"click\",\"mouse_button\":\"back\"}\n// after\n{\"tool\":\"click\",\"mouse_button\":\"right\"}","handlingStrategy":"type-guard","validationCode":"SUPPORTED_BUTTONS = {\"left\", \"right\", \"middle\"}\nbutton = (raw_button or \"left\").lower()\nif button not in SUPPORTED_BUTTONS:\n    button = \"left\"\nop = {\"tool\": \"click\", \"mouse_button\": button}","typeGuard":"def is_supported_button(value) -> bool:\n    return (value or \"left\").lower() in {\"left\", \"right\", \"middle\"}","tryCatchPattern":"try:\n    run_operation(op)\nexcept RuntimeError as e:\n    if \"unsupported mouse button\" in str(e):\n        op[\"mouse_button\"] = \"left\"\n    else:\n        raise","preventionTips":["Restrict mouse_button to left/right/middle.","Omit mouse_button to default to left.","Map any extended-button vocabulary to keyboard shortcuts instead."],"tags":["validation","input-validation","computer-use","mouse","python"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}