Keyboard shortcuts as a workaround in browser automation

How to use keyboard shortcuts as a workaround in browser automation: install the Chrome extension, click Build from description, tell the agent what you want, and follow its prompts. A working bot is built and tested in minutes.

Here is how the automation works. To use keyboard shortcuts in browser automation, add a Press key(s) step, click record and press the keys. The automation presses them on the page as a person would, which gets you past an element you cannot select: arrow keys scroll a box, Tab moves between fields, Enter submits.

Author
Alex Barlow
Published

Build the keyboard shortcut from a description


Describe it and click the button: the agent builds and tests the shortcut in your Chrome extension. Most shortcuts act on whatever has focus, so a Click element step usually comes first to put the cursor in the right place.

  1. Go to the page I give you
  2. Click inside the box with the scrollbar
  3. Press the down arrow key to scroll it
Click to launch the Chrome extension. Not installed? You can create an account and try it free.Opens the Chrome extension. Free account to try.

Have the URL of the page and know which element the shortcut should act on: the box to scroll, the field to tab out of, the message box to submit.

Build the keyboard shortcut step by step


The steps the agent builds, as the Builder shows them: each step by its name, with the fields to set under it. Add them yourself in this order in the step-by-step builder, or open the agent's result there to adjust it.

  • 1.0 Go to page
    • URL: the page with the scrolling box
  • 2.0 Click element
    • Select: a point inside the box you want to scroll
  • 3.0 Press key(s)
    • Key: the recorded down arrow key

Common questions about keyboard shortcuts in browser automation


Why does the Press key(s) step do nothing?

The cursor is not where the shortcut needs it. Add a Click element step just before Press key(s) to click the box or field the keys are for. When a run fails, hand it to the agent and it repairs the step.

What keyboard shortcuts work as workarounds in browser automation?

The ones a person uses to move around a page without the mouse.

Keyboard shortcutWhat it does in an automation
Up and down arrowsScroll a page or a box with scrollbars
Left and right arrowsMove the cursor left or right in an input field
TabMove the cursor between fields in a form, or between elements in a pop-up
EnterSubmit a message in a chat interface, or press a button
Ctrl+C, then Ctrl+VCopy and paste, as a person would
DeleteDelete the value in a text field

How do I hold Ctrl or Shift while pressing another key?

Record them together in one Press key(s) step. Ctrl, Alt and Shift stay held down until the end of the recorded sequence.

Can I press keys from data in a Google Sheet?

Yes. Insert the data in the step's Data field: its contents are entered as key presses and overwrite any recorded sequence. Separate each key press with the Delimiter, which is || by default.

How do I slow down the key presses?

Raise Delay, the time between each key press in milliseconds. It is 10 by default.

Can I submit a form or a chat message with the Enter key?

Yes. Click the field with Click element first, then record Enter in Press key(s); the automation presses it as a person would, which submits the message or presses the form's button.

Can I use keyboard shortcuts in an automation without code?

Yes. Press key(s) records the keys you press; there is no code to write. Describe the page and the keys above and the agent builds it, or add the three steps yourself.

Where do I get help?

Get in touch with support, or ask in the axiom.ai community.

Related guides