On the surface, it sounds like magic: plug a cheap development board into a gaming rig, tap a tiny onboard button, and watch the Windows 11 lock screen vanish in under a second. Beneath the hood, though, this clever weekend build highlights an important distinction every Windows enthusiast and IT tinkerer should understand: there is a world of difference between a USB device that types a password for you and an actual cryptographic security key.
Why Build a Button to Skip Typing a Password?
Singh’s motivation will sound painfully familiar to anyone who runs a desktop PC hard. Having abandoned Windows Sleep mode to let restarts clear out memory leaks and lingering background processes—and having stopped disabling Windows Update after moving to Windows 11—he found himself staring at the Windows lock screen far more often than he liked. Typing a long password repeatedly isn't difficult, just tedious.
Rather than buying external switches or breadboards, Singh leaned on what the ESP32-S3 already brings to the table. Unlike older ESP32 chips that lack native USB OTG hardware, the ESP32-S3 includes a built-in USB 1.1 Full-Speed peripheral that lets the microcontroller present itself to a host PC as a genuine Human Interface Device (HID)—essentially pretending to be a standard USB keyboard ``.
How the Reported Build Came Together
According to Singh's account, the workflow stayed deliberately minimalist:
- Starting point in Arduino IDE: After installing Arduino IDE on Windows, he checked the built-in
File > Examples > USB > Keyboard(KeyboardMessage) sample, found it didn't quite fit his trigger logic, and asked Google Gemini to generate a sketch that waits for a press of the board's onboardBOOTbutton before sending keystrokes. - Port and mode selection: He plugged the board into his PC via its native
USBport rather than itsCOMserial port and enabled USB-OTG mode underTools > USB Mode. - Credential entry and testing: After pasting his Windows lock screen password directly into the sketch and flashing the board, he locked Windows and tapped
BOOT. The PC unlocked in less than a second.
Because Singh did not publish the exact ESP32-S3 board variant, Arduino core version, or full sketch code, those steps shouldn't be treated as a universal copy-and-paste recipe. Still, the core mechanism lines up squarely with Espressif’s hardware design.
Under the Hood: What the ESP32-S3 Is Actually Doing
If you have ever plugged an ESP32-S3 dev kit into a Windows machine and wondered why it has two USB ports—or why your HID keyboard sketch suddenly makes your COM port vanish—Espressif's official documentation clears up the mystery ,.
On the ESP32-S3, the native USB 1.1 Full-Speed peripheral routes its D+ and D- data lines directly to GPIOs 20 and 19 . On dual-port development boards, the connector labeled `USB` is wired straight to those GPIOs, while the second port typically feeds an external USB-to-UART bridge for traditional serial flashing. That is why Singh’s keyboard emulation only functioned over the USB port and ignored the COM port.
Even more interesting is a hardware quirk documented in Espressif’s ESP-USB and Arduino-ESP32 guides:
- One shared PHY for two controllers: The ESP32-S3 packs both a
USB-OTGcontroller and aUSB-Serial-JTAGcontroller, but they share a single physical transceiver (PHY), meaning only one controller can operate at a time,. - Avoiding menu collisions: Espressif specifically warns Arduino-ESP32 users targeting the ESP32-S3 not to combine
Tools > USB Mode: USB-OTG (TinyUSB)withTools > USB CDC On Boot: Enabled, since both stacks fight over that single PHY. Turning on `USB-OTG` hands the native USB port over to TinyUSB device classes like HID keyboards, while pushing serial console output to `UART0` unless carefully configured. - Device mode versus host mode: In this project, the ESP32-S3 operates in USB device mode—sending keystrokes to Windows
. That is the inverse of USB *host* mode, where an ESP32-S3 reads reports *from* an external keyboard or mouse plugged into it, ``.
Espressif's Arduino IDE Tools Menu documentation also cautions that exact board configurations—flash size, PSRAM layout, and even which USB options appear—depend on the specific SoC variant and board target selected. What compiles cleanly on one ESP32-S3 dev board may need different menu choices on another.
Plaintext Password Macro vs. Real Security Key
Here is where the cybersecurity journalist has to step in and gently tap the brakes on the phrase "unlock key."
What Singh built is an automated keyboard macro, not a cryptographic authenticator. In his own write-up, he candidly acknowledges the trade-off: the Windows password sits in plaintext inside the ESP32-S3 sketch, and moving to a cryptographic approach remains a future project he has been putting off.
Why does that distinction matter on a Windows PC?
- Zero identity verification: Pressing the
BOOTbutton does not prove who is at the keyboard. Anyone who walks up to the desk—or walks off with the microcontroller—can press the button to enter the password, or potentially inspect the board's flash memory to extract the stored credential. - No cryptographic challenge-response: Real FIDO2 hardware security keys, by contrast, pair a physical device containing hardware-protected cryptographic keys with a unique PIN ("something you have" plus "something you know")
. Instead of replaying a reusable static password, they sign cryptographic challenges and are bound to specific contexts for phishing resistance, ``. - Built-in Windows alternatives already exist: Microsoft documents native passwordless options in Windows 11 and Windows 10 under
Settings > Accounts > Sign-in options, including Windows Hello (facial recognition, fingerprint readers, and device-bound PINs) as well as FIDO2 physical security keys—and Microsoft has continued expanding lock-screen Web sign-in support for FIDO2 keys and phone passkeys even in enterprise Entra hybrid setups ``.
| Method | How It Unlocks Windows | Where Secret Lives | Main Trade-Off |
|---|---|---|---|
| ESP32-S3 HID Keyboard Macro | Emulates USB keyboard typing stored text on button press `` | Plaintext inside microcontroller sketch/flash | Fun DIY convenience; physically exposes credential |
| Windows Hello (PIN / Biometrics) | Hardware-backed local authentication via Sign-in options | TPM / specialized hardware on the PC | Requires compatible camera, sensor, or local PIN |
| FIDO2 Physical Security Key | Cryptographic challenge-response with device + PIN | Secure element on hardware token | True phishing-resistant MFA; requires supported account/setup, `` |
Singh did note that he looked into safer architectures before choosing the quick route—specifically citing open-source FIDO2 firmware or a background Python script on the PC to verify a cryptographic signature from the ESP32—though he did not implement or test either option. Anyone looking to adapt this idea for anything beyond a low-risk home test bench would be wise to explore those paths—or simply turn on a Windows Hello PIN—rather than leaving a domain or Microsoft account password baked into unencrypted flash.
Practical Caveats Before You Try It Yourself
If this project inspires you to grab an ESP32-S3 for a weekend experiment with a non-sensitive test account, keep a few Windows and HID realities in mind before assuming it will behave flawlessly on every boot:
- Lock screen vs. full reboot states: Singh verified his sketch by locking Windows and pressing
BOOT, though he motivated the build around Windows Update restarts. A locked desktop session and a fresh cold boot aren't always identical—for example, pre-boot BitLocker PIN screens, Windows Recovery Environment prompts, or variations in USB enumeration timing during startup can behave differently than an active Windows session. - Keyboard layout assumptions: In Espressif's Arduino-ESP32
USBHIDKeyboardlibrary,begin()defaults to theKeyboardLayout_en_USmapping ``. If your Windows PC uses a non-US keyboard layout (such as UK, German QWERTZ, or French AZERTY) or a password full of shifted symbols, the keycodes transmitted over USB may not produce the characters Windows expects. - USB-OTG flashing headaches: Once an ESP32-S3 is running a TinyUSB HID sketch without CDC serial active, your PC sees a keyboard rather than a serial programming port. Knowing the hardware recovery dance—typically holding
BOOT, tappingRST/RESET, and releasingBOOT—is essential so you can put the chip back into bootloader mode when you want to change the password or flash a new project ``. - Physical ergonomics: As Singh joked, tapping a microscopic surface-mount
BOOTbutton gets old fast; he already plans to wire up an arcade button or mechanical keyboard switch in a future revision.
The Verdict: Great Starter Project, Terrible Vault
Viewed strictly as an introduction to embedded development, Singh’s build hits the mark. It turns an intimidating microcontroller into something immediately tangible on a Windows 11 desktop, teaches the basics of Arduino IDE configuration, USB-OTG device emulation, and onboard GPIO triggers, and skips the boilerplate weather-station rut.
Just don't mistake a clever keystroke injector for a security boundary. On Windows, convenience and security rarely come from hardcoding passwords into USB gadgets—but as a gateway to learning how USB HID devices talk to your operating system, pressing BOOT to wake up your desktop is a genuinely fun place to start.
References
- I didn't want my first ESP32 project to be boring, so I built an unlock key for my Windows PC XDA · 2026-11-30T20:31:22+00:00
- Arduino IDE Tools Menu - - — Arduino ESP32 latest documentation docs.espressif.com
- microsoft.com support.microsoft.com