Skip to Content

How to Fix RealVNC Viewer Keyboard Input Issue on Raspberry Pi

This blog post explains how to fix the keyboard input issue on RealVNC Viewer when connecting to a Raspberry Pi remotely.

If you use RealVNC Viewer to access your Raspberry Pi remotely, you may encounter a problem where the keyboard input is not shown or accepted on the Pi. This can be frustrating and prevent you from using your Pi effectively. In this blog post, we will explain what causes this issue and how to fix it in a few simple steps.

What is RealVNC Viewer and why use it?

RealVNC Viewer is a software application that allows you to connect to and control another computer remotely over the internet. You can see the desktop of the remote computer and use your mouse and keyboard to interact with it as if you were sitting in front of it.

One of the benefits of using RealVNC Viewer is that it supports Raspberry Pi, a small and affordable computer that can run various operating systems and applications. Raspberry Pi is popular among hobbyists, educators, and developers who use it for projects such as robotics, gaming, media streaming, home automation, and more.

By using RealVNC Viewer, you can access your Raspberry Pi from anywhere in the world, as long as you have an internet connection and the Pi is powered on. This way, you can monitor, manage, and troubleshoot your Pi without having to physically access it.

How to Fix RealVNC Viewer Keyboard Input Issue on Raspberry Pi

What causes the keyboard input issue?

There are several possible reasons why RealVNC Viewer may not accept keyboard input when connecting to a Raspberry Pi. Some of the common ones are:

  • The keyboard layout on the Pi is different from the one on your local computer. For example, if you use a US keyboard layout on your local computer and a UK keyboard layout on your Pi, some keys may not work as expected or at all.
  • The VNC server on the Pi is configured to run in view-only mode. This means that you can only see the desktop of the Pi but not interact with it using your mouse or keyboard.
  • The VNC server on the Pi is configured to use relative pointer motion. This means that the mouse cursor on the Pi moves relative to the position of your local mouse cursor, rather than following it exactly. This can cause problems when you try to click on buttons or menus on the Pi.
  • The VNC viewer on your local computer has some settings that prevent keyboard input from being sent to the Pi. For example, you may have enabled “Pass special keys directly to VNC Server” or disabled “Accept keyboard events” in the viewer options.

How to fix the keyboard input issue?

Depending on the cause of the issue, there are different ways to fix it. Here are some of the solutions that have worked for other users who faced this problem:

Solution 1: Change the keyboard layout on the Pi

If the keyboard layout on the Pi is different from the one on your local computer, you can change it to match your local keyboard layout. To do this, follow these steps:

  1. Connect to your Pi using RealVNC Viewer.
  2. Open a terminal window on the Pi by clicking on the terminal icon on the top left corner of the screen.
  3. Type sudo raspi-config and press Enter. This will open a configuration tool for your Pi.
  4. Use the arrow keys to navigate to “Localisation Options” and press Enter.
  5. Select “Change Keyboard Layout” and press Enter.
  6. Choose your preferred keyboard layout from the list and press Enter.
  7. Follow the instructions on the screen to complete the configuration process.
  8. Reboot your Pi by typing sudo reboot and pressing Enter.

After rebooting, you should be able to use your keyboard normally on your Pi.

Solution 2: Disable view-only mode on the VNC server

If the VNC server on the Pi is configured to run in view-only mode, you can disable it by editing a configuration file on the Pi. To do this, follow these steps:

  1. Connect to your Pi using RealVNC Viewer.
  2. Open a terminal window on the Pi by clicking on the terminal icon on the top left corner of the screen.
  3. Type sudo nano /etc/vnc/config.d/common.custom and press Enter. This will open a text editor with a configuration file for your VNC server.
  4. Look for a line that says ViewOnly=1 and change it to ViewOnly=0. If you don’t see this line, add it at the end of the file.
  5. Press Ctrl+O and then Enter to save the file.
  6. Press Ctrl+X to exit the text editor.
  7. Restart your VNC server by typing sudo systemctl restart vncserver-x11-serviced.service and pressing Enter.

After restarting, you should be able to interact with your Pi using your mouse and keyboard.

Solution 3: Disable relative pointer motion on RealVNC Viewer

If the VNC server on the Pi is configured to use relative pointer motion, you can disable it on your RealVNC Viewer by pressing a keyboard shortcut. To do this, follow these steps:

  1. Connect to your Pi using RealVNC Viewer.
  2. Press F8 on your keyboard (or FN + F8 on macOS) while connected to your Pi. This will open a menu with some options for your VNC connection.
  3. Uncheck “Relative Pointer Motion” in the menu that appears.
  4. Close the menu by clicking anywhere outside of it.

After doing this, you should see the mouse cursor on the Pi follow your local mouse cursor exactly.

Solution 4: Adjust the settings on RealVNC Viewer

If the VNC viewer on your local computer has some settings that prevent keyboard input from being sent to the Pi, you can adjust them by accessing the viewer options. To do this, follow these steps:

  1. Open RealVNC Viewer on your local computer.
  2. Click on the “File” menu and select “Options”.
  3. Go to the “Inputs” tab and make sure that “Accept keyboard events” is checked. If not, check it and click “OK”.
  4. If you want to send special keys (such as Alt, Ctrl, Esc, etc.) to the Pi, you can also check “Pass special keys directly to VNC Server”. If not, uncheck it and click “OK”.

After changing these settings, you should be able to use your keyboard on your Pi.

Frequently Asked Questions (FAQs)

Here are some frequently asked questions related to RealVNC Viewer and keyboard input issue:

Question: What is the difference between RealVNC Viewer and RealVNC Connect?

Answer: RealVNC Viewer is a software application that allows you to connect to and control another computer remotely over the internet. RealVNC Connect is a cloud service that enables you to access your computers from anywhere, without needing to configure firewalls or routers. You need both RealVNC Viewer and RealVNC Connect to use RealVNC.

Question: How can I access my Raspberry Pi without a monitor or keyboard?

Answer: You can access your Raspberry Pi without a monitor or keyboard by using a method called headless setup. This means that you can connect to your Pi using another device (such as a laptop or smartphone) over a network (such as Wi-Fi or Ethernet). To do this, you need to enable SSH (Secure Shell) on your Pi and know its IP address. You can then use an SSH client (such as PuTTY or Termius) to log in to your Pi and run commands. Alternatively, you can use RealVNC Viewer and RealVNC Connect to access your Pi’s graphical desktop remotely.

Question: How can I copy and paste text between my local computer and my Raspberry Pi?

Answer: You can copy and paste text between your local computer and your Raspberry Pi by using the clipboard feature of RealVNC Viewer. To do this, follow these steps:

  • Select the text you want to copy on either your local computer or your Raspberry Pi.
  • Press Ctrl+C (or Command+C on macOS) on your keyboard to copy the text.
  • Switch to the other device (either your local computer or your Raspberry Pi) and click where you want to paste the text.
  • Press Ctrl+V (or Command+V on macOS) on your keyboard to paste the text.

Summary

In this blog post, we have explained how to fix the problem of RealVNC Viewer not accepting keyboard input when connecting to a Raspberry Pi remotely. We have covered some of the possible causes of this issue and some of the solutions that have worked for other users. We hope that this post has helped you solve your problem and enjoy using your Raspberry Pi.

Disclaimer: This blog post is for informational purposes only and does not constitute professional advice. We are not affiliated with or endorsed by RealVNC or Raspberry Pi. We recommend that you always backup your data before making any changes to your system and consult with an expert if you encounter any difficulties.