To type ordinary text into a focused field with Puppeteer, use await page.keyboard.type('Hello'). To enter text into a specific selector, use page.type(selector, text). For a named key such as Enter, use page.keyboard.press('Enter'); use sendCharacter() only when you specifically need its smaller set of input events.
Choose the Puppeteer API for the input you need
| Task | API | Behavior |
|---|---|---|
| Type text into the currently focused element | page.keyboard.type(text, options?) |
Sends keydown, keypress/input, and keyup events for each character. |
| Type text into an element selected by CSS selector | page.type(selector, text, options?) |
Targets the matching element and supports an optional per-character delay. |
| Send only a character’s keypress and input events | page.keyboard.sendCharacter(char) |
Does not send keydown or keyup. |
| Press a named key | page.keyboard.press(key) |
Performs keyboard down-and-up behavior for a key such as Enter or ArrowDown. |
| Set a field’s value through a locator | page.locator(selector).fill(value) |
Fills the field value; use keyboard typing instead when per-character keyboard events matter. |
These distinctions are documented in Puppeteer’s Keyboard.type(), Keyboard API, Page.type(), and getting started guide.
As an Amazon Associate I earn from qualifying purchases.
Type into the focused field
First focus the intended input or textarea, then call page.keyboard.type(). For example:
Free tools Windows power users keep installed
One-click scans. No signup required.
await page.keyboard.type('Hello');
await page.keyboard.type('World', {delay: 100});
await page.keyboard.press('Enter');
The optional delay is measured in milliseconds between characters and defaults to 0. The first two calls type text; the last sends a separate named-key press.
#1 Best Overall
- KEYBOARD: The keyboard works for Windows with hot keys that enable easy access to Media, My Computer, Mute, Volume up/down, and Calculator
- EASY SETUP: Experience simple installation with the USB wired connection
- VERSATILE COMPATIBILITY: This keyboard is designed to work with multiple Windows versions, including Vista, 7, 8, 10 offering broad compatibility across devices.
- SLEEK DESIGN: The elegant black color of the wired keyboard complements your tech and decor, adding a stylish and cohesive look to any setup without sacrificing function.
- FULL-SIZED CONVENIENCE: The standard QWERTY layout of this keyboard set offers a familiar typing experience, ideal for both professional tasks and personal use.
Type into a selector or locator
Selector-based typing
Use page.type() when you want to identify the field by selector rather than arrange focus separately:
await page.type('#mytextarea', 'Hello');
await page.type('#mytextarea', 'World', {delay: 100});
The selector-targeted method supports the same optional delay, which defaults to zero. For special keys, use page.keyboard.press().
Rank #2
- Reliable Plug and Play: The USB receiver provides a reliable wireless connection up to 33 ft (1), so you can forget about drop-outs and delays and you can take it wherever you use your computer
- Type in Comfort: The design of this keyboard creates a comfortable typing experience thanks to the low-profile, quiet keys and standard layout with full-size F-keys, number pad, and arrow keys
- Durable and Resilient: This full-size wireless keyboard features a spill-resistant design (2), durable keys and sturdy tilt legs with adjustable height
- Long Battery Life: MK270 combo features a 36-month keyboard and 12-month mouse battery life (3), along with on/off switches allowing you to go months without the hassle of changing batteries
- Easy to Use: This wireless keyboard and mouse combo features 8 multimedia hotkeys for instant access to the Internet, email, play/pause, and volume so you can easily check out your favorite sites
Locator-based filling
Puppeteer’s current getting-started guide demonstrates opening a search field with a keyboard action and then using a locator’s fill() method to set its value. Choose fill() when setting the field value is the goal; choose keyboard typing when the page needs the per-character keyboard event sequence.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Send one character or a named key
sendCharacter() is not a full key press
page.keyboard.sendCharacter(char) dispatches keypress and input events, but not keydown or keyup. Use it only when that event behavior is what the page requires; it is not equivalent to typing a character through the full keyboard sequence.
Rank #3
- All-day Comfort: The design of this standard keyboard creates a comfortable typing experience thanks to the deep-profile keys and full-size standard layout with F-keys and number pad
- Easy to Set-up and Use: Set-up couldn't be easier, you simply plug in this corded keyboard via USB on your desktop or laptop and start using right away without any software installation
- Compatibility: This full-size keyboard is compatible with Windows 7, 8, 10 or later, plus it's a reliable and durable partner for your desk at home, or at work
- Spill-proof: This durable keyboard features a spill-resistant design (1), anti-fade keys and sturdy tilt legs with adjustable height, meaning this keyboard is built to last
- Plastic parts in K120 include 51% certified post-consumer recycled plastic*
Use press() for keys such as Enter
Call page.keyboard.press('Enter') for Enter, or pass another supported key name such as ArrowLeft. Puppeteer’s KeyInput reference lists supported key names.
Use down and up for modifier-sensitive sequences
For actions that depend on a modifier key, use the keyboard API’s down() and up() around the relevant key press. Modifier keys affect down() and press(); they do not transform the text passed to keyboard.type(). Holding Shift and then calling keyboard.type('hello') will not turn the supplied string into uppercase.
Rank #4
- 【Dreamy Rainbow Gaming Keyboard】K521 Gaming Keyboard Adopts a Different LED Backlight Design, Upgraded on the Traditional LED Backlight Effect, Making the Light More Penetrating, Giving You a More Dazzling Visual Effect, Making Your Gaming Process More Enjoyable
- 【One Touch Opens & Visual Feast】The K521 Red Dragon Keyboard has a One-Touch on/off Lighting Button for Added Convenience. It also has a Three-Position Adjustable Breathing Mode and a Four-Position Adjustable Brightness Lighting Mode
- 【Mechanical Feeling & Fast Tapping】The PC Keyboard Keys are Designed for Mechanical Feeling, Giving You a Better Feel During Use and the Ability to Trigger Keys Quickly, Allowing You to Win All Your Games
- 【19 Keys Anti-Ghosting Keyboard】Anti-Ghosting Ensures Every Button Can Be Triggered. This Allows You to Trigger Key Combinations In The Game Accurately, And Each Skill Can Be Accurately Released to Increase Your Winning Rate. Redragon K521 Will Be Your Perfect Partner
- 【12 Multimedia Combination Keys】The K521 Wired Gaming Keyboard is Equipped with 12 Multimedia Keys That Can Greatly Enhance Your Gaming/Office Efficiency and Make It More Convenient to Use
Troubleshoot text that does not appear as expected
- Nothing is entered:
keyboard.type()sends text to the focused element. Focus the intended field first, or usepage.type(selector, text). - A special key is treated like text: use
page.keyboard.press('Enter')or the relevant named key instead oftype(). - Shift does not capitalize typed text: pass the desired capitalization in the string itself; held modifiers do not affect
keyboard.type(). - The page responds differently than expected to
sendCharacter(): it omits keydown and keyup. Usekeyboard.type()if the full per-character sequence is required. - Typing is too fast for the interaction: set the optional per-character
delayin milliseconds, for example{delay: 100}.
Or skip the browser setup
If your goal is to capture a page rather than automate text input, ScreenshotNeo can return a screenshot with one GET request. Its API accepts a URL, and the code and request options are documented at ScreenshotNeo docs.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutecurl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
- Cookie banners are accepted and removed before capture; known consent platforms, newsletter popups, and chat widgets can also be removed, with each step configurable.
- Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing; response headers identify the page verdict and whether the request was billed.
- An MCP server provides
take_screenshot,get_page_info, andcapture_pdftools for AI agents and MCP clients. - The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo and get 1,000 free screenshots a month, with no card.
Best Value
- All-day Comfort: This USB keyboard creates a comfortable and familiar typing experience thanks to the deep-profile keys and standard full-size layout with all F-keys, number pad and arrow keys
- Built to Last: The spill-proof (2) design and durable print characters keep you on track for years to come despite any on-the-job mishaps; it’s a reliable partner for your desk at home, or at work
- Long-lasting Battery Life: A 24-month battery life (4) means you can go for 2 years without the hassle of changing batteries of your wireless full-size keyboard
- Simply plug the USB receiver into a USB port on your desktop, laptop or netbook computer and start using the keyboard right away without any software installation
- Simply Wireless: Forget about drop-outs and delays thanks to a strong, reliable wireless connection with up to 33 ft range (5); K270 is compatible with Windows 7, 8, 10 or later
Frequently Asked Questions
Does Puppeteer type into the currently focused element?
Yes. page.keyboard.type(text) sends text to the focused element.
How do I press Enter after typing?
Call await page.keyboard.press('Enter') separately.
Does Puppeteer’s typing delay use seconds?
No. The optional delay is in milliseconds per character and defaults to zero.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsQuick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




