Touchpad, Mouse, and Keyboard

Make Pointing Easy

Change the acceleration and sensitivity of your touchpad, mouse, and scroll wheel. Map extra keys using xorg config or Solaar.

Please read the disclaimer before proceeding. We review and update guided solutions regularly. If you have suggestions or requests, please write support@kfocus.org.

Input Devices with System Settings

system-settingsSystem Settings is the preferred and most convenient way to adjust your mouse and touchpad. Click on System Settings > Input Devices to access controls for either.

Input Menu

Keyboard Mapping

When you first turn on a Kubuntu Focus system, it requests you select a keyboard layout which assigns meanings to keys. This assignment is often called “Keyboard Mapping.” Later, you can change or enhance this. First, we summarize where one can make these changes, and then we look at the two methods we recommend for this purpose.

Where to Change Mapping

One can adjust keyboard mapping on many levels. Starting nearest the hardware and working our way towards apps, you can change the meanings of keys in the keyboard firmware, BIOS, OS, interface (xmodmap for X11, and loadkeys for TTY), desktop environment, and per-app. Frequently, not all levels are available. For example, the keyboard firmware may not be programmable. Also, not all capabilities are available at all levels. For example, a 3D rendering app may not provide facilities to remap the control keys. We recommend either using KDE Plasma Keyboard or using OS-Wide settings.

KDE Plasma Keyboard
KDE Plasma Keyboard

System SettingsIf you do all your work in the KDE Plasma desktop environment, this should be all you need. It’s simple and fast. However, it does not propagate to virtual terminals or other desktop environments. Click on System Settings > Input Devices > Keyboard to change your layout and mappings. In the image above, we show how to remap Caps Lock to an extra Control key. There are many other combinations. Even if you eventually use OS-Wide settings, this is a great way to quickly find the adjustments you prefer.

OS-Wide Configuration
OS Keyboard Config

This is a bit more involved, but results in key mappings that work across all interfaces, such as virtual terminals, other desktop environments, and, of course, in KDE Plasma. The first step is to adjust /etc/default/keyboard to use keyboard options we prefer. Here, we can set XKBOPTIONS="ctrl:swapcaps" then run sudo dpkg-reconfigure keyboard-configuration. When stepping through the configuration screens as illustrated above, accept the defaults and then reboot. This will propagate your changes throughout the system. If we wanted to use both keys as control, we could use ctrl:nocaps in XKBOPTIONS.

More Information

See all available options using localectl list-x11-keymap-options, or man localectl. or this Ask Ubuntu response. This Ask Ubuntu response may also be useful.

Libinput Touchpad Settings

system-settingsUse System Settings > Input Devices > Touchpad to adjust the touchpad settings. If you need to restore the original settings, press the Defaults button at the bottom left.

Some Focus laptops like the M2 GEN 5 and Ir14 GEN 1 use simpler Libinput touchpad settings. While this appears less capable than the Synaptics interface shown in the next section, we found it to be a better choice for these models. Specifically, we found the touchpad was less prone to accidental clicks while still retraining the features most users want. If you would like to try the Synaptics settings instead, can install the driver as shown below. Uninstall the driver to revert to Libinput.

# Install Synaptics driver sudo apt install xserver-xorg-input-synaptics # Purge Synaptics driver sudo apt purge xserver-xorg-input-synaptics
Libinput Touchpad Settings

Synaptics Touchpad Settings

system-settingsOther Focus laptops use the Synaptics touchpad settings shown below. As above, use System Settings > Input Devices > Touchpad to access the settings. If you need to restore the original settings, press the Defaults button at the bottom left.

If you wish, you may try the simpler Libinput touchpad settings as discussed in the prior section.

Touchpad 002Touchpad 003Touchpad 004Touchpad 005Touchpad 006

Mouse Settings

system-settingsUse System Settings > Input Devices > Mouse. If you need to restore the defaults, press the Defaults button at the bottom left. This will present you with the basic mouse controls, as shown below.

Mousecfg 006.5

konsoleTo get advanced settings, open a terminal and enter:

echo 'Section "InputClass" Identifier "evdev-mouse" MatchIsPointer "yes" Driver "evdev" EndSection' \ |sudo tee /usr/share/X11/xorg.conf.d/91-evdevmouse.conf

Now sign out and back in to see the advanced mouse controls as shown below.

Mousecfg 007Mousecfg 008Mousecfg 009

IMWheel

This video by Eric Adams shows how to use imwheel to increase scroll wheel speed and button mapping. Remember to create an autostart file to apply your settings between logins.


Use Solaar to manage advanced Logitech hardware like the MX Master 3 Mouse and the MX Keys. Solaar makes managing universal USB receivers easy. Use the Discover software manager to install or the command-line with sudo apt install solaar.

IMWheel
Xorg Configuration

Xorg Configuration

Logitech Trackman Marble mouse support is configured with the file /usr/share/X11/xorg.conf.d/50-marblemouse.conf. Other devices may be configured in a similar fashion. See the excellent Arch Linux guide. You may wish to search for a file for your specific mouse device that you can drop into the xorg.conf.d directory.

Troubleshooting

Q: My Logitech MX Master 3 wireless mouse is jerky or stuttering. Sometimes the cursor takes half a second to catch up with my input. How can I fix this?

A: There are two likely fixes. First, try moving the universal receiver different port. We have verified this often solves the issue completely. We have noticed this issue when using a front USB 3 port on NX systems; moving the receiver to the back USB 2 port fixes it. The second likelihood is channel interference. Install and run Solaar to remove your mouse connection, then change the connection channel (1 of 3, found on the underside of the mouse). Then connect again.

Q: Whenever I shut down my computer, it wakes up again. This only happens with an external USB keyboard however. When it is not attached, this does not happen. What is going on and how can I fix this?

A: Some USB peripherals can trigger a Wake Event at inappropriate times. This can be disabled in the BIOS. To fix on an NX GEN 2, use the following:

The steps for an NX GEN 1 should be similar.

Revisions

This is a partial revision history. See the git repository for all entries.

Disclaimer

We try hard to provide a useful solution validated by professionals. However, we cannot anticipate every situation, and therefore cannot guarantee this procedure will work for your needs. Always backup your data and test the solution to determine the correct procedure for you.

THIS SOLUTION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOLUTION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

HAVE QUESTIONS? Call 844-536-2871 or write
TellMeMore@kfocus.org | GET FOCUS GEAR

KFocus Logo