Device classes · Input vs storage
Block USB Storage but Keep the Keyboard and Mouse Working
Blocking USB storage while keeping the keyboard and mouse means denying the storage classes and leaving the input classes alone. Windows draws that line for you, because a flash drive and a keyboard report themselves as different kinds of device.
Enable All Removable Storage classes: Deny all access for the account, or set the USBSTOR Start value to 4 for the PC. Both stop flash drives, disks and portable devices and leave keyboards, mice, headsets and webcams working. Test every dock and hub port once.
| Applies to | Windows 10 and 11, wired and wireless input devices |
|---|---|
| Time needed | 5 minutes plus a test |
| Difficulty | Easy once the policy exists |
| Cost | $0 |
| Needs | Administrator rights, your own devices |
| Last verified | November 2026 |
How Windows Tells a Drive From a Keyboard
Each USB device announces a class when it connects. Mass-storage devices announce one family, input devices announce another, and the removable-storage policy points at the storage family only. That is why the same setting that stops a flash drive never touches a mouse.
See the device class table in the main guide for the full list of classes the policy covers. This page looks at the cases where the line blurs.
Edge Cases: Docks, Hubs, Dongles and Phones
Docks and hubs
A hub forwards each device on its own terms. A dock often bundles several functions in one box, so one cable carries keyboard ports, Ethernet and a card reader. After you block storage, the card reader stops while the rest continues.
Wireless dongles
A dongle is an input device, so it passes. A few expose a drive for vendor software, which may get blocked and does no harm.
Phones and tablets
A phone in file-transfer mode appears as a portable device, and Deny all access covers that class. A phone set to charge only does not read or write files at all.
A Five-Minute Test Routine for Every Device You Own
Do not trust the class table alone. Walk through the devices you actually use and record what happens.
| Device | Expected after the block | How to test |
|---|---|---|
| USB keyboard | Works | Type in Notepad |
| Mouse or trackpad | Works | Move and click |
| Headset | Works | Play a sound |
| Webcam | Works | Open the Camera app |
| Flash drive | Access denied | Open it in File Explorer |
| Phone, file transfer | Blocked | Check This PC |
| Dock card reader | Blocked | Insert a card |
See which class each device reports
This PowerShell line lists connected USB devices with their class, so you can confirm a keyboard reports HIDClass and a drive reports a storage class.
Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -like 'USB*' } | Select-Object Class, FriendlyNameDevice test checklist
What a Storage Block Does Not Stop
A device that pretends to be a keyboard is not storage, so storage policy cannot see it. It may type commands as if a person did. Treat storage blocking as one layer, and add control over who can reach the ports, endpoint protection and an allow-list of known hardware IDs.
Copy protection and port rules deter casual copying. They do not stop a determined attacker with physical access.
If you use blocking software, check what it claims. The USB Block product page names storage categories and is silent on input devices, so try it on a spare PC before you rely on it where a keyboard is your only input.
USB Block applies to the whole PC. Use the policy method when only one account is affected.
Questions People Ask: Block USB storage, keep keyboard and mouse
Will a Deny all access policy freeze my keyboard?
No. Keyboards and mice belong to the human interface device class, and removable-storage policy covers disks, CD and DVD drives, tape and portable devices only. If a keyboard stops, the cause lies elsewhere, such as a driver or a hub. Try another port first.
Does a wireless mouse dongle count as storage?
No. A dongle presents itself as an input device, so storage policy leaves it alone. A few vendor dongles also expose a small drive for drivers, and that part may be blocked. Plug it in after the policy applies and check that the pointer moves.
What about a USB hub or a docking station?
A hub passes devices through, so each child device follows its own class. A dock may bundle a card reader with Ethernet and input ports. The card reader counts as storage and gets blocked, while the rest keep working. Test every port once after enabling the policy.
Can a fake keyboard still get past a storage block?
Yes. A device that identifies itself as a keyboard is not storage, so storage policy does not stop it. Defend against that with physical control of the ports, device allow-listing by hardware ID, and endpoint protection, not with removable-storage policy alone.
Will my webcam, headset and printer keep working?
Yes, in normal cases. They use video, audio and print classes, none of which is a storage class. Some printers and cameras also expose a memory card slot, and that slot appears as a removable disk and gets blocked. Test the one you own.
Does USB Block touch keyboards and mice?
The product page lists storage drives, discs, network locations and non-system partitions as the blocked categories and says nothing about input devices. Treat that as unconfirmed for your keyboard, and try it on a spare PC before you rely on it on a desk without another input.