Skip to main content

KeyboardOptions

Extends: CommandOptions

Options for keyboard operations.

For example, use with the VoiceOver keyboard:

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

const safariKeyboardOptions = {
application: MacOSApplications.Safari,
};

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

// Enter a username on Safari.
await voiceOver.type("my-username", safariKeyboardOptions);
await voiceOver.press("Enter", safariKeyboardOptions);

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

Contents:

keyboardOptions.application

Optional: Identifier for target application. If not provided, the current focused application will be targeted.

Type: string

See also: