WebView.press method | Bun module | Bun
BuildDocsReferenceGuidesBlogDiscord/
Bun/
WebView/
pressMpress
Search the reference...
/
BuildDocsReferenceGuidesBlogDiscord/
Bun/
WebView/
pressMpress
method
WebView.presspress(key: string & {} |
VirtualKey,options?:
PressOptions): Promisevoid>;
Press a key.
Named keys ("Enter", "Backspace", "ArrowLeft", etc.) map to editing commands where available and resolve when WebContent has processed them. "Escape" and keys with modifiers fall back to raw keyDown/keyUp (no WebKit barrier exists for keyboard events — a following evaluate() serializes).
A single character (e.g. "a") combined with modifiers sends a chord like Cmd+A.
Referenced typestype
VirtualKey = 'Enter' | 'Tab' | 'Space' | 'Backspace' | 'Delete' | 'Escape' | 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown' | 'Home' | 'End' | 'PageUp' | 'PageDown'interface
PressOptionsmodifiers?:
Modifier[]
Modifier keys to hold during the keypress.
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlog Toolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →