Matterway
    Preparing search index...

    Function press

    • Simulates pressing a key, or a combination of keys.

      Parameters

      • ctx: Context

        Context object

      • keys: KeyInput[]

        Name of key to press, such as ArrowLeft. KeyInput for a list of all key names.

      • Optionaloptions: PressKeyOptions

        Options for key press and pupeeteer keyboard press: pressDuration, timeBetweenPresses, times, text.

      Returns Promise<void>

      await press(ctx, [key, ...modifiers], options);
      
      await press(ctx, ['a','Control']); // Select all
      
      await press(ctx, ['Backspace'], {timeBetweenPresses: 100, times: 5, pressDuration: 200});