MCPcopy Index your code
hub / github.com/callstack/agent-device / handleAlternateClick

Function handleAlternateClick

src/core/dispatch-interactions.ts:238–267  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  x: number,
  y: number,
  button: ClickButton,
  context: DispatchContext | undefined,
)

Source from the content-addressed store, hash-verified

236}
237
238async function handleAlternateClick(
239 device: DeviceInfo,
240 x: number,
241 y: number,
242 button: ClickButton,
243 context: DispatchContext | undefined,
244): Promise<Record<string, unknown>> {
245 assertAlternateClickSupported(device, button, context);
246 if (device.platform === 'linux') {
247 return await runLinuxAlternateClick(x, y, button);
248 }
249 const { runAppleRunnerCommand } = await import('../platforms/apple/core/runner/runner-client.ts');
250 await runAppleRunnerCommand(
251 device,
252 {
253 command: 'mouseClick',
254 x,
255 y,
256 button,
257 appBundleId: context?.appBundleId,
258 },
259 runnerOptionsFromContext(context),
260 );
261 return {
262 x,
263 y,
264 button,
265 ...successText(formatPressMessage({ x, y, button })),
266 };
267}
268
269function assertAlternateClickSupported(
270 device: DeviceInfo,

Callers 1

handlePressCommandFunction · 0.85

Calls 6

successTextFunction · 0.90
runLinuxAlternateClickFunction · 0.85
runAppleRunnerCommandFunction · 0.85
runnerOptionsFromContextFunction · 0.85
formatPressMessageFunction · 0.85

Tested by

no test coverage detected