Skip to content

Instantly share code, notes, and snippets.

@gowizzard
Created October 9, 2022 07:12
Show Gist options
  • Save gowizzard/e045226b64c6b28a0700a36f350a7587 to your computer and use it in GitHub Desktop.
Save gowizzard/e045226b64c6b28a0700a36f350a7587 to your computer and use it in GitHub Desktop.
Linux Ubuntu .hwdb configuration for Kensington Expert Mouse.
# Override the mouse buttons for the kensington expert mouse.
evdev:name:Kensington Expert Mouse:*
KEYBOARD_KEY_90003=back
KEYBOARD_KEY_90004=forward
@gowizzard
Copy link
Author

gowizzard commented Oct 9, 2022

Kensingtion Expert Mouse - Ubuntu 22.04 Konfiguration

This is the corresponding documentation. I bought a Kensington Expert Mouse some time ago and wanted to set it up on Ubuntu 22.04. I quickly encountered some problems, because under Wayland also xinput does not want as the tutorials I found. I found an article. that helped me a lot. I also found an article on stackexchange, which also helped me a lot. Here you will find a short version of mine.

Installation

  1. In principle, this is also only about the configuration of the upper two keys. I have set these in the Gist to back and forward. If you want to put other functions on the buttons, you can find all available KEY_* names in the following file:
vim /usr/include/linux/input-event-codes.h
  1. Either you create or copy now the file with the content from this gist in the following directory:
/etc/udev/hwdb.d
  1. Please save the file and execute the following command to restart the service.
sudo systemd-hwdb update
  1. Now comes the most important step, which has brought me to despair. Please remove the USB device from your computer and plug it back in. Now the adjustments should take effect.

@gowizzard
Copy link
Author

Small update

I noticed that I am missing the middle button of the mouse after all. So I replaced forword with the btn_middle. The whole thing looks like this:

# Override the mouse buttons for the kensington expert mouse.
evdev:name:Kensington Expert Mouse:*
 KEYBOARD_KEY_90003=back
 KEYBOARD_KEY_90004=btn_middle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment