stablyai/orca · error · RuntimeError
unsupported mouse button: {button}
Error message
unsupported mouse button: {button} What it means
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.
Source
Thrown at native/computer-use-linux/runtime.py:832
parsed = float(value)
except (TypeError, ValueError):
raise RuntimeError(f"{name} must be a positive number")
if not math.isfinite(parsed) or parsed <= 0:
raise RuntimeError(f"{name} must be a positive number")
return parsed
def require_non_empty_string(value, name):
if value is None or str(value) == "":
raise RuntimeError(f"{name} is required")
return str(value)
def click_at(x, y, button, count, modifiers=None):
button = (button or "left").lower()
buttons = {"left": ("b1p", "b1r"), "right": ("b3p", "b3r"), "middle": ("b2p", "b2r")}
if button not in buttons:
raise RuntimeError(f"unsupported mouse button: {button}")
parsed_count = require_positive_integer(1 if count is None else count, "click_count")
modifier_keys = click_modifier_keys(modifiers)
if modifier_keys:
modified_click_at(x, y, button, parsed_count, modifier_keys)
return
down, up = buttons[button]
for _ in range(parsed_count):
Atspi.generate_mouse_event(round(x), round(y), "abs")
Atspi.generate_mouse_event(round(x), round(y), down)
time.sleep(0.03)
Atspi.generate_mouse_event(round(x), round(y), up)
def click_modifier_keys(raw):
if raw is None:
return []
aliases = {
"ctrl": "ctrl", "control": "ctrl", "cmdorctrl": "ctrl", "commandorcontrol": "ctrl",View on GitHub (pinned to 1136503c6a)
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.
Example fix
// before
{"tool":"click","mouse_button":"back"}
// after
{"tool":"click","mouse_button":"right"} Defensive patterns
Strategy: type-guard
Validate before calling
SUPPORTED_BUTTONS = {"left", "right", "middle"}
button = (raw_button or "left").lower()
if button not in SUPPORTED_BUTTONS:
button = "left"
op = {"tool": "click", "mouse_button": button} Type guard
def is_supported_button(value) -> bool:
return (value or "left").lower() in {"left", "right", "middle"} Try / catch
try:
run_operation(op)
except RuntimeError as e:
if "unsupported mouse button" in str(e):
op["mouse_button"] = "left"
else:
raise Prevention
- Restrict mouse_button to left/right/middle.
- Omit mouse_button to default to left.
- Map any extended-button vocabulary to keyboard shortcuts instead.
When it happens
Trigger: 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.
Common situations: 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'.
Related errors
- click modifiers require modifier keys only
- {name} must be a positive number
- {name} is required
- direction is required
- unsupported scroll direction: {direction}
AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12).
Data as JSON: /api/errors/5e6eb88db5915309.
Report an issue: GitHub.