In this comprehensive guide, we will be discussing how to resolve the issue of the right-click function not working on an HP touchpad in Ubuntu 18.04. This issue can be quite frustrating, but with a few tweaks, you can restore your touchpad’s right-click functionality.
To fix right-click not working on an HP touchpad in Ubuntu 18.04, you can try using Gnome Tweaks to enable right-click functionality in the bottom right area of the touchpad. If that doesn’t work, you can modify the Xorg configuration file to enable right-click functionality.
Understanding the Issue
By default, Ubuntu 18.04 uses a two-finger click as a right-click method on touchpads without a physical button. This means that to perform a right-click, you simply tap anywhere on the touchpad with two fingers. However, if this doesn’t work or you prefer a different behavior, there are a few other solutions you can try.
Solution 1: Using Gnome Tweaks
One of the simplest ways to resolve this issue is by using the Gnome Tweaks application. This application allows you to customize various aspects of your Ubuntu system, including the behavior of your touchpad.
- Installation: Open the Ubuntu Software application (the orange briefcase icon) and search for “gnome tweaks”. Click on the “Install” button to install the application.
- Configuration: Once installed, launch Gnome Tweaks. Under the “Keyboard & Mouse” tab, navigate to “Mouse Click Emulation”. Here, you will find two options: “Fingers” and “Area”. Select the “Area” option. This will enable right-click functionality when clicking in the bottom right area of the touchpad.
- Apply Changes: If the change doesn’t take effect immediately, try logging out and logging back in.
Solution 2: Modifying Xorg Configuration
If the Gnome Tweaks solution doesn’t work for you, you can try modifying the Xorg configuration. This involves editing a system file, so proceed with caution and ensure you have a backup of any important files.
- Accessing Xorg Configuration: Open a terminal by pressing
Ctrl + Alt + T. In the terminal, run the command
sudo vi /etc/X11/xorg.conf. This command opens the Xorg configuration file in a text editor. The
sudocommand gives you administrative permissions,
viis the text editor, and
/etc/X11/xorg.confis the path to the configuration file.
- Modifying the File: In the configuration file, add the following lines:
This code block creates a new section in the configuration file for your touchpad. The
Section "InputClass" Identifier "libinput touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Driver "libinput" Option "Tapping" "True" Option "NaturalScrolling" "True" EndSection
Identifierline names this section. The
MatchIsTouchpadline ensures this configuration applies only to touchpad devices. The
MatchDevicePathline specifies the device file paths that this configuration applies to. The
Driverline specifies the driver to be used. The
Optionlines enable tapping and natural scrolling on the touchpad.
- Applying the Changes: Save the file and reboot your system. This configuration should enable right-click functionality on your touchpad.
In this article, we’ve discussed two solutions to fix the right-click not working on an HP touchpad in Ubuntu 18.04. If neither of these solutions work for you, it’s recommended to seek further assistance on Ubuntu forums or ask for help from the Ubuntu community on Ask Ubuntu. Remember, troubleshooting is a process of elimination. With patience and persistence, you’ll get your touchpad working as desired.
These solutions are specifically tailored for HP touchpads in Ubuntu 18.04. While some aspects may be applicable to other touchpad models or operating systems, it is recommended to consult specific guides or seek assistance for your particular setup.
To access the terminal in Ubuntu 18.04, you can press
Ctrl + Alt + T. This keyboard shortcut will open the terminal window.
To back up important files before modifying the Xorg configuration, you can simply create a copy of the file you are about to edit. In the terminal, you can use the
cp command followed by the file path and the destination path. For example,
sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak creates a backup file with the ".bak" extension.
If the changes do not take effect immediately after modifying the Xorg configuration, you can try logging out and logging back in. This can help reload the necessary configurations and apply the changes to your touchpad.
If something goes wrong after modifying the Xorg configuration, you can revert the changes by restoring the backup file you created earlier. Use the
sudo cp command to copy the backup file back to the original location. For example,
sudo cp /etc/X11/xorg.conf.bak /etc/X11/xorg.conf will restore the original configuration file.