Skip to content

Key Press

Type: page-key-press  ·  Package: Browser v1.0.9

Sends a key or a combination to the page, such as Enter, Tab, Escape, F5 or shortcuts like Control+a. Useful to submit forms with Enter, move between fields with Tab, close dialogs with Escape or trigger the application’s keyboard shortcuts.

If you set a selector, it first waits for the element to exist (up to timeout), focuses it and then sends the key(s). If you omit it, the key goes to the page (to whichever element has focus), right away. Keys use Playwright names (see table), and combinations are joined with +: the modifiers are held down and the last key is pressed.

Before sending them, the activity normalizes the names case-insensitively, so you can write shortcuts naturally:

You writeIt sends
ctrl, controlControl
alt · shiftAlt · Shift
win, metaMeta
enter, returnEnter
esc, escapeEscape
del, delete · ins, insertDelete · Insert
pgup, pageup · pgdn, pagedownPageUp · PageDown
left, right, up, downArrowLeft, ArrowRight, ArrowUp, ArrowDown
tab, space, backspace, home, end, f1…f12Tab, Space, Backspace, Home, End, F1…F12
A single letter (A)Lowercase (a)

Any other name is sent as-is. To write text use Type Text or Fill Field: this activity is for single keys and shortcuts.

ParameterTypeDefaultDescription
keysstring—Key or combination. E.g. Tab, Enter, Escape, F5, Control+a, Shift+Tab, Control+Shift+i.
ParameterTypeDefaultDescription
pageZoanPageSession—The page session. Omit it inside a body; outside, pass the session variable (e.g. page = page).
selectorselector—Element to focus before sending the key. If omitted, it goes to the page.
timeoutnumber30000Maximum time in ms to wait for the element (only with selector). Empty, 0 or negative: the project settings value or, if none, 30000.
Keykeys
EnterEnter
TabTab
EscapeEscape
ArrowsArrowDown, ArrowUp, ArrowLeft, ArrowRight
Function keysF1 … F12
Select allControl+a
Reverse tabShift+Tab

This activity does not return a value.

Search and confirm with Enter:

Page Fill selector = (#buscar) value = "invoice 2026"
Page Key Press selector = (#buscar) keys = "Enter"
Page Wait For selector = (.resultados) state = visible
MessageCause and fix
'keys' is required.keys is empty.
Unknown key: "…"The key name doesn’t exist. Use the names in the tables on this page or check the spelling.
Timeout 30000ms exceededWith selector, the element didn’t appear in time. Check the selector or wait first with Wait For.
'page' must be a ZoanPageSession.page is empty outside a body.
  • Type Text — write text (not special keys).
  • Click — an alternative to confirm by pressing a button.