Skip to content

Latest commit

 

History

History
141 lines (108 loc) · 3.82 KB

File metadata and controls

141 lines (108 loc) · 3.82 KB

Logitech MX Series on Fedora Linux: The Ultimate Guide

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:

  1. The "Right Alt" Fix: Solving the issue where the Right Alt key acts like the Windows key.
  2. Mouse Configuration: Configuring SmartShift and custom buttons (Copy/Paste) for MX Master 3S.
  3. Building Logiops: How to compile the driver from source.

🔍 Diagnostic Tools (Finding Button Codes)

If you have a different device or want to find new button IDs, use these commands to "listen" to your devices for 10 seconds.

1. Listen to Keyboard Scancodes (Hardware Level)

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/eventX

2. Listen to Mouse CID Codes (Driver Level)

Use 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 -v

3. Identify ASCII/Key Codes (System Level)

Use this to see what character the system actually receives (e.g., to see if Alt is acting as Meta).

timeout 10 showkey -a

🖱 Button CID Reference (MX Master 3S)

Verified 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)

Part 1: The "Right Alt" Fix (Essential for Polish-Language/Special Characters)

If your Right Alt + L logs you out instead of typing ł, follow this.

  1. Copy the hardware rule:
    sudo cp config/90-logitech-alt.hwdb /etc/udev/hwdb.d/
  2. Apply changes:
    sudo systemd-hwdb update
    sudo udevadm trigger
  3. Run the settings script (Sets NumLock, Logout Shortcut, etc.):
    chmod +x scripts/setup_settings.sh
    ./scripts/setup_settings.sh
  4. Log out and log back in.

Part 2: MX Master 3S Configuration

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 logid

Part 3: Advanced - Building Logiops (logid) from Source

1. Install Prerequisites

sudo dnf install -y cmake gcc-c++ git \
    libevdev-devel systemd-devel libconfig-devel glib2-devel

2. Download and Compile

git clone https://github.com/PixlOne/logiops.git
cd logiops
mkdir build && cd build
cmake ..
make
sudo make install

3. Enable Service

sudo systemctl enable --now logid

💡 Additional Recipe: Implementing "Double Click"

Logiops cannot natively perform a reliable "Double Click" action.

Steps to implement in the future:

  1. Install ydotool:

    sudo dnf install ydotool
    sudo systemctl enable --now ydotool
  2. Modify logid.cfg: Map the Top Button (0x52) to an unused key like F19.

    {
        cid: 0x52;
        action = { type: "Keypress"; keys: ["KEY_F19"]; };
    }
  3. 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.