Skip to main content

ClickOptions

Extends: CommandOptions

Options for click operations.

For example, use with the VoiceOver mouse cursor:

import { voiceOver } from "@guidepup/guidepup";

(async () => {
// Start VoiceOver.
await voiceOver.start();

// Left-click the mouse.
await voiceOver.click();

// Left-click the mouse using specific options.
await voiceOver.click({ button: "left", clickCount: 1 });

// Double-right-click the mouse.
await voiceOver.click({ button: "right", clickCount: 2 });

// Stop VoiceOver.
await voiceOver.stop();
})();

Contents:

clickOptions.button

Optional: Mouse button to click. One of: "left", "right". Defaults to "left" if not provided.

Type: string

clickOptions.clickCount

Optional: Number of times to click the mouse. One of: 1, 2, 3. Defaults to 1 if not provided.

Type: number