{"record":{"id":"0f796295abca56a6","repo":"stablyai/orca","slug":"invalid-argument-0f7962","errorCode":"invalid_argument","errorMessage":"Click modifiers accept modifier keys only, e.g. CmdOrCtrl or CmdOrCtrl+Shift.","messagePattern":"Click modifiers accept modifier keys only, e\\.g\\. CmdOrCtrl or CmdOrCtrl\\+Shift\\.","errorType":"exception","errorClass":"RuntimeClientError","httpStatus":null,"severity":"error","filePath":"src/cli/handlers/computer-action-flags.ts","lineNumber":81,"sourceCode":"  mouseButton?: string\n  modifiers?: string\n} {\n  const rawModifiers = flags.get('modifiers')\n  const modifiers = typeof rawModifiers === 'string' ? rawModifiers : undefined\n  const result = {\n    elementIndex: getOptionalNonNegativeIntegerFlag(flags, 'element-index'),\n    x: getOptionalNumberFlag(flags, 'x'),\n    y: getOptionalNumberFlag(flags, 'y'),\n    clickCount: getOptionalPositiveIntegerFlag(flags, 'click-count'),\n    mouseButton: getOptionalStringFlag(flags, 'mouse-button'),\n    modifiers\n  }\n  validateElementOrCoordinates('Click', result.elementIndex, result.x, result.y)\n  validateMouseButton(result.mouseButton)\n  if (modifiers !== undefined) {\n    const message = computerUseClickModifiersValidationMessage(modifiers)\n    if (message) {\n      throw new RuntimeClientError('invalid_argument', message)\n    }\n  }\n  return result\n}\n\nexport function getComputerSecondaryActionFlags(flags: Map<string, string | boolean>): {\n  elementIndex: number\n  action: string\n} {\n  return {\n    elementIndex: getRequiredNonNegativeIntegerFlag(flags, 'element-index'),\n    action: getRequiredStringFlag(flags, 'action')\n  }\n}\n\nexport function getComputerScrollActionFlags(flags: Map<string, string | boolean>): {\n  elementIndex?: number\n  x?: number","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/src/cli/handlers/computer-action-flags.ts#L63-L99","documentation":"On click, computerUseClickModifiersValidationMessage inspects --modifiers. It must be 1-4 parts joined by '+', each matching a known modifier after toLowerCase (alt, cmd, cmdorctrl, command, commandorcontrol, control, ctrl, meta, option, shift, super, win). Unlike hotkey, click modifiers do NOT strip spaces/underscores/hyphens, so 'Cmd Or Ctrl' fails. Non-modifier keys (e.g. a letter) and more than 4 parts also fail. The click target itself is supplied via --element-index or coordinates, not via --modifiers.","triggerScenarios":"`--modifiers Ctrl+A` (A is not a modifier), `--modifiers Ctrl+Shift+Alt+Cmd+Win` (5 parts > 4), `--modifiers \"Cmd Or\"` (space not stripped), or an empty modifiers value.","commonSituations":"Putting the actual key into --modifiers instead of using hotkey; expecting hotkey-style normalization in click modifiers; pasting a hotkey string into --modifiers.","solutions":["Use modifier names only, joined by +, e.g. --modifiers CmdOrCtrl+Shift","Drop --modifiers entirely if no modifier keys are needed","Remember the limit is 4 parts and case-insensitive but whitespace/underscores are not tolerated"],"exampleFix":"// before\norca computer click --app Safari --element-index 2 --modifiers Ctrl+A\n// after\norca computer click --app Safari --element-index 2 --modifiers CmdOrCtrl+Shift","handlingStrategy":"validation","validationCode":"import { computerUseClickModifiersValidationMessage } from '../../shared/computer-use-key-spec'\nfunction assertClickModifiers(modifiers) {\n  if (modifiers === undefined) return\n  const message = computerUseClickModifiersValidationMessage(modifiers)\n  if (message) throw new Error(message)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Reuse the shared computerUseClickModifiersValidationMessage validator rather than reimplementing the rule","Remember click --modifiers holds modifier keys only; the pressed key goes through the element target, not here","Do not put spaces/underscores in modifier parts for click (hotkey tolerates them, click does not)"],"tags":["cli","computer-use","click","modifiers","validation"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}