Quick fix: Disable the built-in keyboard in Device Manager: expand Keyboards, right-click the PS/2 or HID keyboard entry (matching the integrated one), choose Disable device. To auto-disable on external connect, use a Task Scheduler task triggered by USB keyboard insertion event.
You use an external keyboard on top of your laptop’s built-in one. Accidentally bumping the laptop’s keys triggers unexpected input. Or the cat sits on the laptop. You want the built-in keyboard inactive when an external is connected.
Affects: Windows 11 on laptops.
Fix time: 10 minutes.
Method 1: Manual disable via Device Manager
- Connect the external keyboard first.
- Device Manager → expand Keyboards.
- Identify the built-in keyboard (usually labeled with a PS/2-style entry or HID-Compliant keyboard linked to the integrated device).
- Right-click → Disable device.
- Confirm. The built-in keyboard stops responding.
Method 2: Block driver permanently via Group Policy
- Get the built-in keyboard’s Hardware ID from Device Manager → Properties → Details.
- gpedit.msc → Computer Configuration → Administrative Templates → System → Device Installation → Device Installation Restrictions.
- Open Prevent installation of devices that match any of these device IDs. Add the Hardware ID.
- Also enable Also apply to matching devices that are already installed.
- gpupdate /force.
- The built-in keyboard is now permanently disabled.
Method 3: Auto-disable on external connect via Task Scheduler
- Create a script
C:\Scripts\disable-builtin-kbd.cmd:
pnputil /disable-device “HID\VID_XXXX&PID_YYYY&…”
(Use the device instance path from Device Manager → Properties → Details → Device instance path.) - Task Scheduler → new task triggered by USB keyboard insertion event.
- Use Event Viewer to find the event ID for USB keyboard plug-in (in Microsoft-Windows-Kernel-PnP/Configuration log).
- Trigger the script on that event.
- Create a complementary script to re-enable on external disconnect.
Verification
- External keyboard connected. Try typing on built-in keyboard — no response.
- Disconnect external. Built-in resumes working (if you re-enable manually) or stays off (Method 2).
If none of these work
If Device Manager doesn’t identify which keyboard is which, both may use generic HID-Compliant Keyboard names. Disable each one at a time to find the built-in. For chronic identification issues, look at Bus reported device description in Properties.
Bottom line: Disable via Device Manager for one-time; Group Policy for permanent; Task Scheduler for automatic. Pick the path that matches your workflow.