I just finished turning my Raspberry Pi Pico into a Macro Keyboard.

The most annoying thing about it is that Windows treats it as a USB drive, and opens file explorer every time it is plugged in.

Since I will be using this device on multiple computers, I can't really do anything on the computer level.

However, I still want to be able to access the files on the Pico if I need to.

So basically, if this makes sense, I want my Pico to become a "Keyboard" device, but have some type of command or something I can run on Windows to give me access to the files.

Looking around the internet for others with the same problem, I only found one forum post, however the answer was not helpful to me at all.

Please let me know if I need to explain something a bit better!

  • 2
    this is a windows problem, not a Raspberry Pi problem ... configure windows to not open file explorer when flash drives are plugged in ... don't ask how
    – jsotola
    Sep 7, 2022 at 1:53
  • Without knowing your exact implementation, it's hard to give specifics. Are you using the bare C SDK or something different? I would start by looking at a way of controlling the MSC device (mass storage class aka USB drive) that the Pico creates, so that it can be turned off or on by the Pico.
    – user85471
    Sep 15, 2022 at 22:51

1 Answer 1


See "https://forums.raspberrypi.com/viewtopic.php?t=315263"

In fact, you need to create a "boot.py" file and to put a "storage.disable_usb_drive()", and you must know that this specific command can't work in "code.py" because the USB devices are already setup (see "https://learn.adafruit.com/customizing-usb-devices-in-circuitpython/circuitpy-midi-serial")

I was looking for the same issue but I found the solution, I hope it will help you !

  • Awesome find! Don't know how I missed that in my Googling ... Aug 22, 2023 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.