Skip to main content
Glama

browser_press_key

Press keyboard keys on web pages to submit forms, close modals, navigate menus, or trigger shortcuts using standard key values and modifiers.

Instructions

[Disabled] Press a keyboard key on the page. Dispatches trusted (isTrusted: true) keyboard events via Chrome DevTools Protocol Input.dispatchKeyEvent. Named keys (Enter, Escape, etc.) dispatch rawKeyDown + keyUp; printable characters dispatch keyDown + char + keyUp. Common use cases: Enter to submit forms, Escape to close modals/dialogs, Tab to move between fields, arrow keys to navigate custom menus/dropdowns, Ctrl+K or Cmd+K for search. Supports Ctrl and Meta (Cmd) as independent modifiers. Uses standard KeyboardEvent.key values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdYesTab ID of the page to interact with
keyYesKey name using standard KeyboardEvent.key values (e.g., "Enter", "Escape", "Tab", "ArrowDown", "a", "1", " ")
selectorNoCSS selector of element to focus before pressing key. If omitted, dispatches to document.activeElement.
modifiersNoModifier keys to hold while pressing the key

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/opentabs-dev/opentabs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server