This repository contains configuration files, scripts, and documentation to fully set up Logitech devices (specifically MX Keys and MX Master) on Fedora Linux.
It covers:
- The "Right Alt" Fix: Solving the issue where the Right Alt key acts like the Windows key.
- Mouse Configuration: Configuring SmartShift and custom buttons (Copy/Paste) for MX Master 3S.
- Building Logiops: How to compile the driver from source.
If you have a different device or want to find new button IDs, use these commands to "listen" to your devices for 10 seconds.
Use this to find the raw scancode (like 700e7) for the hwdb fix.
# First, identify your device event number (e.g., event17)
grep -E "Name=|Handlers=" /proc/bus/input/devices | grep -A 1 "Logitech"
# Then run evtest (replace 'eventX' with your number)
sudo evtest /dev/input/eventXUse this to find the 0x codes for logid.cfg.
# Stop the service and run in verbose mode
sudo systemctl stop logid
sudo timeout 10 logid -vUse this to see what character the system actually receives (e.g., to see if Alt is acting as Meta).
timeout 10 showkey -aVerified IDs for logid.cfg:
| Button Name | CID (Hex) | Default Function |
|---|---|---|
| Top Button | 0x52 |
Manual Shift (Toggle Wheel Mode) |
| Back Button | 0x53 |
Browser Back |
| Forward Button | 0x56 |
Browser Forward (Used for Copy in our config) |
| Gesture Button | 0xc3 |
Thumb Button (Hold for Gestures) |
| Thumb Wheel Click | 0xc4 |
(Natively supported in some apps) |
If your Right Alt + L logs you out instead of typing ł, follow this.
- Copy the hardware rule:
sudo cp config/90-logitech-alt.hwdb /etc/udev/hwdb.d/
- Apply changes:
sudo systemd-hwdb update sudo udevadm trigger
- Run the settings script (Sets NumLock, Logout Shortcut, etc.):
chmod +x scripts/setup_settings.sh ./scripts/setup_settings.sh
- Log out and log back in.
The file config/logid.cfg contains the configuration for the mouse.
- Side "Forward" Button (0x56): Remapped to Copy (
Ctrl + C). - Scroll Wheel: SmartShift enabled.
To apply this config:
sudo cp config/logid.cfg /etc/logid.cfg
sudo systemctl restart logidsudo dnf install -y cmake gcc-c++ git \
libevdev-devel systemd-devel libconfig-devel glib2-develgit clone https://github.com/PixlOne/logiops.git
cd logiops
mkdir build && cd build
cmake ..
make
sudo make installsudo systemctl enable --now logidLogiops cannot natively perform a reliable "Double Click" action.
Steps to implement in the future:
-
Install
ydotool:sudo dnf install ydotool sudo systemctl enable --now ydotool -
Modify
logid.cfg: Map the Top Button (0x52) to an unused key likeF19.{ cid: 0x52; action = { type: "Keypress"; keys: ["KEY_F19"]; }; } -
Create a GNOME Shortcut:
- Name: Mouse Double Click
- Command:
sh -c "ydotool click 0xC0 && sleep 0.05 && ydotool click 0xC0" - Shortcut: Press the mouse button.