Skip to content

Instantly share code, notes, and snippets.

@StevenMaude
Last active June 8, 2022 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StevenMaude/4703456b584cb89a18d2f20a23065ab7 to your computer and use it in GitHub Desktop.
Save StevenMaude/4703456b584cb89a18d2f20a23065ab7 to your computer and use it in GitHub Desktop.
Remapping Logitech MX Revolution second mouse wheel under Wayland
# Function:
# This HWDB entry maps the second mouse wheel to volume controls.
#
# Usage:
# 1. cp 10-mx-revolution.hwdb /etc/udev/hwdb.d/10-mx-revolution.hwdb
# 2. sudo systemd-hwdb update
# 3. sudo udevadm trigger
#
# References:
# https://wiki.archlinux.org/title/Map_scancodes_to_keycodes
# https://yulistic.gitlab.io/2017/12/linux-keymapping-with-udev-hwdb/
# https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h
# https://unix.stackexchange.com/questions/326373/configure-extra-mouse-button-as-a-second-middle-click-under-wayland
# https://askubuntu.com/questions/1145057/remapping-mouse-buttons-to-keyboard-keys
evdev:input:b0003v046DpC525e0111*
ID_INPUT_KEY=1
KEYBOARD_KEY_90009=volumeup
KEYBOARD_KEY_9000b=volumedown
KEYBOARD_KEY_9000d=mute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment