Skip to main content

Overview

Press one or more keyboard keys simultaneously, useful for keyboard shortcuts, navigation, and special keys.

Syntax

Parameters

Array<string>
required
Array of keys to press simultaneously

Returns

Promise<void>

Common Keys

Special Keys

  • 'enter', 'tab', 'escape', 'backspace', 'delete'
  • 'space', 'up', 'down', 'left', 'right'
  • 'home', 'end', 'pageup', 'pagedown'

Modifier Keys

  • 'ctrl', 'alt', 'shift'
  • 'command' (macOS), 'win' (Windows)
  • 'ctrlleft', 'ctrlright', 'shiftleft', 'shiftright'

Function Keys

  • 'f1' through 'f24'

Examples

Keyboard Shortcuts

System Shortcuts

Form Submission

Text Editing

Best Practices

Wait after shortcutsSome keyboard shortcuts trigger animations or navigation:
Use Tab for form navigationTab is more reliable than clicking multiple fields:
Platform-specific keysUse the appropriate modifier key for the platform:
  • Windows/Linux: 'ctrl'
  • macOS: 'command'

Use Cases

Complete Example