Can You Use Wireless Keyboard and Mouse on Raspberry Pi?


Using accessories with your Raspberry Pi can often be a headache. Different ports, different operating system, it doesn’t always work like a standard computer. In this article, we’ll focus on the keyboard and mouse. Can you use them with your Raspberry Pi?

Wireless keyboards and mice can be used with the Raspberry Pi by simply inserting the USB dongle provided in one USB port on the Raspberry Pi. The operating system will install them automatically, and it will work directly. For Bluetooth accessories, they need to be paired first.

This article will explain how to use them if you already have one, which ones to buy if you don’t and also other ways to control a Raspberry Pi without a keyboard or mouse.

How to Install a Wireless Keyboard or Mouse on Raspberry Pi

When installing a wireless keyboard or mouse on a Raspberry Pi, it’s usually the same process you’d use for wired equivalents.

With a USB adapter: plug & play

If you have a USB adapter with your hardware, it’ll be easy! Just plug the dongle (which is generally stored in the mouse) in any empty USB port on the computer Raspberry Pi or other computer.

Raspberry Pi OS and most other distributions will detect it automatically, so you can use it immediately. I have several wireless keyboards with a USB adapter, and all of them work without a problem and with no configuration required.

Raspberry Pi Bootcamp
Sale: 10% off today.
Take it to the next level.
I'm here to help you get started on Raspberry Pi.
Learn all the skills you need in the correct order.

Installing a Bluetooth keyboard or mouse on Raspberry Pi OS

If you don’t have a USB adapter because your keyboard or mouse uses Bluetooth, there are a few additional steps.
On Raspberry Pi OS with Desktop, follow this procedure:

  • If not already done, turn on the Bluetooth interface.
    You can do this by clicking on the Bluetooth icon in the upper-right corner:
  • Then, click again on the Bluetooth icon, and choose “Add device…”:
  • The Raspberry Pi will start Bluetooth devices detection.
    Make sure your keyboard is in pairing mode, and you should see it in the list.
  • Select your keyboard in the list and click on “Pair”.

Depending on your hardware, you might have an additional step where you need to type a PIN code on the keyboard, but most of the time it will be associated directly.

You can now use your Bluetooth keyboard or mouse on Raspberry Pi OS, no configuration required.
The only thing you might need to change is the keyboard layout. If this is the case, you can read this article that explains how to do this.

If you are on a Lite version, it’s also possible to pair your Bluetooth keyboard by using the following commands sequence:
sudo bluetoothctl
agent on
default-agent
scan on

Once you have the MAC address, connect to it with:
trust <MAC-Address>
connect <MAC-Address>

But most of the time, I find this too complicated and useless.
Using SSH will be much easier if you have another computer (more details about this at the end of this article).

Wireless keyboard and mouse recommendations

If you are reading this article because you are wondering if a wireless keyboard and mouse is a good choice for yourself, I can tell you that it’s probably a good idea. I have two products that I can recommend, depending on how you’ll use them.

For Desktop usage

The first case might be if your goal is to use a Raspberry Pi as a standard computer. I have tested it with a Raspberry Pi 4, and it works fine for basic tasks, so why not?

In this case, you’ll need a comfortable keyboard. There are many models available, but the one I recommend here is this one from SunFounder. It’s a Bluetooth keyboard, so you can keep your USB ports free. It also it works on any operating system (Linux but also Windows and Android) and has is a decent battery capacity.

There is a touchpad on this keyboard, so you don’t need a mouse. But if you use your Raspberry Pi 8 hours a day, you might prefer to use a standard mouse. I personally use this one from Logitech, but probably don’t need something this expensive as the advanced features won’t work on Linux (no driver).

Instead, you can use this one from Microsoft. I previously used it with my laptop, and it works perfectly.
In both cases, there is a USB adapter provided, so you have nothing to configure, just plug and play :).

For other usages

Most of the time, I use my Raspberry Pi for small projects. For example, testing something for you guys, installing an OS to see how it works, installing a service, testing a configuration etc. I don’t really need to type so many things.

That’s why my favorite keyboard, in my case, is to use this product from Riitek. I bought it with my first Raspberry Pi and I haven’t ever changed it. There is a USB adapter, I haven’t ever tested it with a system where it doesn’t work. There is a touchpad, and it’s tiny so easy to carry around.

The battery capacity is remarkable, I use it every day and I don’t think I even need to recharge every month! It’s also great if you want to use it as a desktop replacement with Kodi. It has all the shortcuts you need for this (play, pause, forward/rewind, etc.).
My only regret is to have it in AZERTY while all operating systems start in QWERTY by default :).

Using a Raspberry Pi without keyboard or mouse

In this last part, we’ll see that a keyboard or mouse is not mandatory with a Raspberry Pi. Yes, it’ll be more convenient to have one sometimes, but there are many cases where it’s not required.

Connect to your Raspberry Pi via SSH

The first option is to use your desktop or laptop computer and connect to your Raspberry Pi computer via SSH.

This will give you the added advantage of using the monitor from your desktop or laptop computer. This is the option I use most of the time. By using SSH you will use the Command Line Interface (CLI) rather than the Graphical User Interface (GUI).

The drawback of using this method is that it is only available in CLI mode and if you are not used to this, it could take a time to learn. If you need some help to get started, you can check these articles:

Master your Raspberry Pi in 30 days
Sale: 10% off today.
Download the eBook.
Uncover the secrets of the Raspberry Pi in a 30 days challenge.
Learn useful Linux skills and practice multiples projects.

Remote access

Depending on your level and goals, using the command line might not be the best option for you. In this case, another alternative to consider is to use a remote access software.

VNC is the most popular option that comes to mind, as it’s preinstalled on Raspberry Pi OS. It allows you to see the graphical user interface from a remote computer. If you have another computer on the same network, it’s a great option to consider.

VNC is not the only solution, you can find more (and better) options in this article.

On-Screen keyboard

Finally, an additional option is to use an on-screen keyboard instead of a physical keyboard. Basically, it’s an app that appears automatically when you start your Raspberry Pi, with a virtual keyboard. You’ll need a mouse or a touchscreen to use it, but a keyboard isn’t required.

Obviously, this will not be a solution for desktop usage, but for the initial configuration it can save you from buying a keyboard to just type things like your Wi-Fi password and a few commands.

Interested? You can read my article here on the different on-screen keyboard solutions you can try.
I’m using them with my touchscreen (the one I tested here) and they work well.

I hope this article answered your questions, but if you have any doubts, feel free to leave a comment below, and I will do my best to answer them.

Raspberry Pi Resources

Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now

Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiples projects with step-by-step guides.
Download the e-book

VIP Community
If you just want to hang out with me and show your support, you can also join the Patreon community. I share behind-the-scenes content there and give you early access to my content. You’ll also get a shoutout when you join.
More details here

Need help to build something with Python?
Create, understand and improve any Python script for your Raspberry Pi.
Learn the essentials, step-by-step, without losing time understanding useless concepts.
Get the e-book now

You can also find all my recommendations for tools and hardware on this page.


This tutorial doesn't work anymore? Report the issue here, so that I can update it!


Patrick Fromaget

I'm the lead author and owner of RaspberryTips.com. My goal is to help you with your Raspberry Pi problems using detailed guides and tutorials. In real life, I'm a Linux system administrator with a web developer experience.

Recent Posts

Master your Raspberry Pi - 10% off