Configure Logitech MX Master 3 on Linux (LogiOps)

,

I was a Windows user until very recently, when I decided to switch to some Linux distribution as my daily driver. I chose Zorin OS 16 Pro, primarily because – (1) it is based on Ubuntu, which I have been using on my Raspberry Pi 4 for a while (2) it comes with pre-installed apps (which saved me a couple of hours). The only reason I reluctant to switch because Linux does not support Adobe CC out of the box and it does not support Logitech Options.

MX Master 3 is one of my prized possessions, it is very close to my heart. It is one of the finest mice that I’ve ever had, and it feels really nice. Although I do not use all the MX Master 3 buttons and gestures, I still wanted to be able to configure SmartShift and DPI. Fortunately, LogiOps functions more or less like Logitech Options, albeit all on command line.

Installing LogiOps

Fire your terminal (of course) install dependencies

sudo apt install cmake libevdev-dev libudev-dev libconfig++-dev 

After this, you need to clone the LogiOps GitHub repo

git clone https://github.com/PixlOne/logiops.git

Next, you need to build the source. You can refer to this link for that.

Once you’re done with building the project, to install, run

sudo make install

Enable and start the daemon by running the following command

sudo systemctl enable --now logid

You should be able to run logid by running

sudo logid

The output should look something like this:

[WARN] Error adding device /dev/hidraw2: std::exception
[INFO] Detected receiver at /dev/hidraw1
[WARN] Error adding device /dev/hidraw5: std::exception
[INFO] Detected receiver at /dev/hidraw4
[WARN] Error adding device /dev/hidraw4: No DJ reports
[INFO] Device found: Wireless Mouse MX Master 3 on /dev/hidraw1:1

Configuring

The configuration file resides in – /etc/logid.cfg. If it does not exist, you can simply create it by touch logid.cfg.

Open the logid.cfg and paste the contents from this GitHub Gist.

// Logiops (Linux driver) configuration for Logitech MX Master 3.
// Includes gestures, smartshift, DPI.
// Tested on logid v0.2.3 - GNOME 3.38.4 on Zorin OS 16 Pro
// What's working:
//   1. Window snapping using Gesture button (Thumb)
//   2. Forward Back Buttons
//   3. Top button (Ratchet-Free wheel)
// What's not working:
//   1. Thumb scroll (H-scroll)
//   2. Scroll button

// File location: /etc/logid.cfg

devices: ({
  name: "Wireless Mouse MX Master 3";

  smartshift: {
    on: true;
    threshold: 15;
  };

  hiresscroll: {
    hires: true;
    invert: false;
    target: false;
  };

  dpi: 1500; // max=4000

  buttons: (
    // Forward button
    {
      cid: 0x56;
      action = {
        type: "Gestures";
        gestures: (
          {
            direction: "None";
            mode: "OnRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_FORWARD" ];
            }
          },

          {
            direction: "Up";
            mode: "OnRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_PLAYPAUSE" ];
            }
          },

          {
            direction: "Down";
            mode: "OnRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_LEFTMETA" ];
            }
          },

          {
            direction: "Right";
            mode: "OnRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_NEXTSONG" ];
            }
          },

          {
            direction: "Left";
            mode: "OnRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_PREVIOUSSONG" ];
            }
          }
        );
      };
    },

    // Back button
    {
      cid: 0x53;
      action = {
        type: "Gestures";
        gestures: (
          {
            direction: "None";
            mode: "OnRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_BACK" ];
            }
          }
        );
      };
    },

    // Gesture button (hold and move)
    {
      cid: 0xc3;
      action = {
        type: "Gestures";
        gestures: (
          {
            direction: "None";
            mode: "OnRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_LEFTMETA" ]; // open activities overview
            }
          },

          {
            direction: "Right";
            mode: "OnRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_LEFTMETA", "KEY_RIGHT" ]; // snap window to right
            }
          },

          {
            direction: "Left";
            mode: "OnRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_LEFTMETA", "KEY_LEFT" ];
            }
		  },

		  {
            direction: "Up";
            mode: "onRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_LEFTMETA", "KEY_UP" ]; // maximize window
            }
		  },
		  
		  {
            direction: "Down";
            mode: "OnRelease";
            action = {
              type: "Keypress";
              keys: [ "KEY_LEFTMETA", "KEY_DOWN" ]; // minimize window
            }
          }
        );
      };
    },
	
    // Top button
    {
      cid: 0xc4;
      action = {
        type: "Gestures";
        gestures: (
          {
            direction: "None";
            mode: "OnRelease";
            action = {
              type: "ToggleSmartShift";
            }
          },

          {
            direction: "Up";
            mode: "OnRelease";
            action = {
              type: "ChangeDPI";
              inc: 1000,
            }
          },

          {
            direction: "Down";
            mode: "OnRelease";
            action = {
              type: "ChangeDPI";
              inc: -1000,
            }
          }
        );
      };
    }
  );
});

This configuration will set the DPI to 1500 and SmartShift sensitivity to 15.

Key Bindings and Actions

ButtonActionPerforms
Mode Shift ButtonPressSwitch between Ratchet and Free Scroll mode
Mode Shift Button Hold + Swipe UpIncrease the DPI by 1000
Mode Shift ButtonHold + Swipe DownDecrease the DPI by 1000
Gesture ButtonPressActivities Overview
Gesture ButtonHold + Swipe RightSnap the window to right
Gesture ButtonHold + Swipe LeftSnap the window to left
Gesture ButtonHold + Swipe DownMinimize the window
Gesture ButtonHold + Swipe UpMaximize the window
Back ButtonPressGo Back
Forward ButtonPress Go Forward
Forward ButtonHold + Swipe UpPlay/Pause Media
Forward ButtonHold + Swipe DownSuper/Windows Key
Forward ButtonHold + Swipe RightNext Song
Forward ButtonHold + Swipe LeftPrevious Song
Configurations

For more information on configuration, you may refer to this wiki. To learn more about the Linux Event Codes, like KEY_LEFTMETA, check out this link.

Conclusion

There are two things that won’t work with this logid.cfg:

  1. The thumb scroll wheel (useful for switching between tabs)
  2. Scroll press (I personally use it to emulate Ctrl + B in VS Code)

It would be nice to have Logitech Options on Linux since the product information shows that it is ‘compatible’ with Linux, Windows, and Mac. Logitech Options lets you choose app-specific settings which is something that I miss very much, but while developers at Logitech work on Logitech Options for Linux (hoping that they are) LogiOps is the best tool we have to configure most of its functionality.

Issue ‘Forward/Back Button Not Working in VSCode’:

If your Logiop configuration is not working in VSCode, please follow these steps:

  1. Open your logid.cfg file (it will be located at /etc/logid.cfg if you have followed my tutorial).
  2. Navigate to the desired section (forward button and back button have cid: 0x56; and cid: 0x53; respectively).
  3. Change the ‘type’ from Gesture to Keypress.
  4. Bind desired keys to it (for event codes, look here).
  5. Open VSCode and go to Keyboard Shortcuts (Ctrl + K Ctrl + S).
  6. Bind your favourite action to the keys.

For example, if I want to bind Toggle Tabs to Back Button, I will change:

gestures: (
{
direction: "None";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_BACK" ];
}
}
);
};

to

action = {
type: "Keypress";
keys: [ "KEY_LEFTCTRL", "KEY_PAGEDOWN" ];
};

Thanks to Eduardo for pointing it out.

You can achieve the same using VSCode Key Bindings, as suggested by Vladimir:

  1. Using the VSCode Settings (UI), find the “Go Back” action in the ‘Shortcuts’ settings
  2. Click on “Add Keybinding”
  3. Click the ‘back’ button on the mouse
  4. Repeat the steps for the ‘forward’ button

Snap minimize or maximize window below cursor:

The default snap behaviour controls only the active window, i.e., the window which is selected (clicked upon). This may not be ideal since one has to activate the window before operating on it. Thanks to pLum0 ([email protected]), we can make a script using xdotool to fix this.

Check here: https://askubuntu.com/questions/1400834/how-to-snap-minimize-maximize-window-below-cursor

Fix horizontal scrolling

In case you are facing issues with horizontal scroll (thumb scroll), you may try this fix by Joren Miner ([email protected]). Place the snippet below on the same level as “smartshift” or “hiresscroll”:

thumbwheel: {
    divert: false;
    invert: false;
};

Comments

52 responses to “Configure Logitech MX Master 3 on Linux (LogiOps)”

  1. tux Avatar
    tux

    connecting a keyboard needs installing spyware? since when became to this?

  2. Terence Avatar
    Terence

    Thanks for this! Awesome config.

  3. Juan Avatar
    Juan

    Hi Daniel.
    Do you know if it is possible to bind a Gesture (for example KeyPress + UP or KeyPress + DOWN) to the Easy Switch functionality located at the bottom of the MX Master 3? (In order to swtich between computers).
    Thanks in advance!
    Juan

  4. Tim Avatar
    Tim

    There is a Solaar application. I used it to set up the keyboard. The description says that it supports all logi products

  5. Alexey Avatar

    Thumbwheel as Volume regulator (work with MX Master 3):

    thumbwheel:
    {
    divert: true
    invert: false
    left: {
    mode: “OnInterval”
    pixels: 1
    action: {
    type: “Keypress”
    keys: [“KEY_VOLUMEDOWN”]
    }
    }
    right: {
    mode: “OnInterval”
    pixels: 1
    action: {
    type: “Keypress”
    keys: [“KEY_VOLUMEUP”]
    }
    }
    }

  6. wmbruckner Avatar
    wmbruckner

    Strangely enough, the mouse button behind the wheel now works as a middle button using the configuration below, since I configured Linux to make left+right button work as a middle button.
    The only thing I’m still missing is the use of the thumbwheel on my MX Master 2S, but logid doesn’t recognize it, so I guess I have to wait for an update.

  7. wmbruckner Avatar
    wmbruckner

    Your explanations helped me a lot. However, I cannot seem to make the button behind the mouse work as a standard middle mouse button. I tried this:
    {
    cid: 0xc4;
    action =
    {
    type: “Keypress”;
    keys: [“BTN_MIDDLE”];
    };
    In my opinion, this should have worked, but sadly, it doesn’t.
    Any idea what’s wrong with that setting?

  8. Aneesh M V Avatar
    Aneesh M V

    Hi Danish!
    Thank you for this! However my gesture button does not seem to be working with this configuration. What can be done? I have tried restarting the service.

  9. sciumegpp Avatar
    sciumegpp

    Try to set the proper name as done in one of the comments above

  10. sciumegpp Avatar
    sciumegpp

    How can I decrease the Magspeed wheel scrolling?

  11. MiMEKiZ Avatar
    MiMEKiZ

    Даю подсказку всем, кто только начинает разбираться, как это настроить.
    Если у вас нет конфига в /etc директории, создайте и скопируйте туда содержимое, что предоставлено в статье ( не торопитесь что либо менять ).
    (не забудьте сделать всё, что говорится в статье, я лишь дают пояснение по дальнейшим моментам).
    Дальше, команда sudo logid -v запустит или перезапустит вам сам сервис (не нужно трогать systectl, его перезагрузка вам ничего не даст).
    Читайте вывод, что даёт приложение вам в консоль. Вам нужно взять название из сообщение с [DEBUG].
    Например, у вас будет
    [INFO] Device found: MX Master 3 for Mac on /dev/hidraw8:255
    значит вам нужно скопировать “MX Master 3 for Mac” и вставить это имя в конфиге в самой врехней секции device->name.
    После того как замените название, снова перезагрузите приложение sudo logid -v. Если вы сделали всё как говорится в статье, и установили правильное имя – у вас применится конфигурация. Теперь вы можете спокойно менять назначения кнопок как вам требуется.

  12. Erick Avatar
    Erick

    I wish there was a video of this. As someone who doesn’t know much about computers I got lost at “fire your terminal.” You might be wondering “why do I have a linux then?” and the answer is that I got a steam deck. I’m hoping to also use it for work and this mouse is pretty important for that.

  13. JZ Avatar
    JZ

    Has anyone found a way to reverse the direction of the thumb scroll, so that when I scroll left, it goes left. Currently it is going right when I scroll left.

    1. Danish Shakeel Avatar

      I think `invert: false` does that. Have you tried it?

  14. Mike Avatar
    Mike

    Worked for MX master 3S.

    Only after updating name in .cfg to “MX Master 3S”
    as per: https://github.com/PixlOne/logiops/issues/251

    My console said:
    [DEBUG] Unsupported device /dev/hidraw0 ignored
    [INFO] Device MX Master 3S not configured, using default config.
    [INFO] Device found: MX Master 3S on /dev/hidraw1:255
    [DEBUG] /dev/hidraw1:255 remappable buttons:
    [DEBUG] CID | reprog? | fn key? | mouse key? | gesture support?
    [DEBUG] 0x50 | | | YES |
    [DEBUG] 0x51 | | | YES |
    [DEBUG] 0x52 | YES | | YES | YES
    [DEBUG] 0x53 | YES | | YES | YES
    [DEBUG] 0x56 | YES | | YES | YES
    [DEBUG] 0xc3 | YES | | YES | YES
    [DEBUG] 0xc4 | YES | | YES | YES
    [DEBUG] 0xd7 | YES | | | YES
    [DEBUG] Thumb wheel detected (0x2150), capabilities:
    [DEBUG] timestamp | touch | proximity | single tap
    [DEBUG] YES | YES | YES | YES
    [DEBUG] Thumb wheel resolution: native (18), diverted (120)

  15. Vladimir Kim Avatar
    Vladimir Kim

    I found a more elegant solution to the back/forward buttons problem in VScode

    Let’s leave the button bindings on “KEY_FORWARD” and “KEY_BACK”.

    You just need to add additional shortcuts for “Go back” and “Go forward” actions

    This can be done via the vscode GUI
    1. Find the “go back” action in the shortcuts settings
    2. Right-click and click “Add Keybinding…”
    3. click the back button on the mouse
    4. Repeat steps 1-3, but for the forward button
    5. Enjoy:)

    This way buttons will work not only in vscode, but also in browser, for example.

    Admin, please add to the main guide

    Translated with http://www.DeepL.com/Translator (free version)

    1. Danish Shakeel Avatar

      Thank you for the solution, I have added it.

  16. Vladimir Kim Avatar
    Vladimir Kim

    Я нашел более элегантное решение проблемы с кнопками back/forward в VScode

    Оставляем привязку кнопок на “KEY_FORWARD” и “KEY_BACK”

    Необходимо просто добавить дополнительные shortcuts на действия “Go back” и “Go forward”

    Делается это через GUI vscode
    1. Находим действие “go back” в настройке шорткатов
    2. Нажимаем правой кнопкой мыши и нажимаем “Add Keybinding…”
    3. Нажимаем на кнопку back на мышке
    4. Проделываем шаги 1-3, но для forward кнопки
    5. Enjoy:)

    Таким образом кнопки будут работать не только в vscode, но и в браузере, например.

    Админ, добавь пожалуйста в основной гайд

  17. MortyDev Avatar
    MortyDev

    Amazing job! Thank you for this article; so much pleasure now to work with the GNOME desktop. Image with buttons was very, very helpful.

  18. schick Avatar
    schick

    Hi there, could you please help me with this issue, Iḿ desperate. Trying to connect a MX Master 1. I am getting this error:

    [ERROR] I/O Error while reading /etc/logid.cfg: FileIOException
    [INFO] Detected receiver at /dev/hidraw1
    [WARN] Error adding device /dev/hidraw2: std::exception
    [WARN] Error ignored on detached thread/task: _readReport read failed: Input/output error
    [INFO] Receiver on /dev/hidraw1 disconnected
    [INFO] Detected receiver at /dev/hidraw1
    [WARN] Error adding device /dev/hidraw1: Invalid sub ID
    [WARN] Error adding device /dev/hidraw2: std::exception

    1. Danish Shakeel Avatar

      Hi, Schick.

      Have you tried using a different USB port or using an alternate mode of connectivity (bluetooth/unifying receiver)?

  19. samiran kawtikwar Avatar
    samiran kawtikwar

    Hi, thanks for developing the utility.
    i am facing a problem not discussed here, my installation process is stuck at the sudo logid step.
    This is the output I have got so far:

    mpiuser@tb-014-ub1:/usr/local/games/logiops/build$ sudo logid
    [ERROR] I/O Error while reading /etc/logid.cfg: FileIOException
    [WARN] Error adding device /dev/hidraw3: std::exception
    [INFO] Detected receiver at /dev/hidraw2

    It’s been 5 minutes and it hasn’t moved forward, I don’t think it’s been able to detect the receiver or devices.
    Please help.

    These are my system details:
    OS: Ubuntu 18.04.1 LTS
    CPU: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz

    Thanks

    1. Danish Shakeel Avatar

      Hi, Samiran.

      Could you please let me know about the mode of connectivity and if you have used a different USB port?

  20. Valdo Avatar
    Valdo

    Regarding my previous comment, it turned out to be wrong USB port for Unifying dongle. When I was plugging it in I didn’t noticed that it was BIOS flash port on my motherboard. It
    is working fine now, just strange that it worked on Windows.

    Looking forward for application integration to be done.

    Thanks for config.

    1. Danish Shakeel Avatar

      It might be how the different kernels manage ports/power differently. I need to check if I can get my unifying dongle to work, thank you 😉

  21. Valdo Avatar
    Valdo

    Thanks for a great tutorial, but after installing logid drivers my mouse became unusable. It keeps disconnecting and logid spits errors and waking signals.
    It works fine in windows.
    Here’s logid:
    “`
    [INFO] Detected receiver at /dev/hidraw4
    [INFO] Device found: Wireless Mouse MX Master 3 on /dev/hidraw4:1
    [WARN] Error adding device /dev/hidraw5: std::exception
    [INFO] /dev/hidraw4:1 woke up.
    [INFO] /dev/hidraw4:1 fell asleep.
    [INFO] /dev/hidraw4:1 woke up.
    [INFO] /dev/hidraw4:1 fell asleep.
    [INFO] /dev/hidraw4:1 woke up.
    [ERROR] Caught HID++ 1.0 error while trying to initialize /dev/hidraw4:1: Resource error
    [INFO] /dev/hidraw4:1 woke up.
    [INFO] /dev/hidraw4:1 fell asleep.
    [INFO] /dev/hidraw4:1 woke up.
    “`
    And logid.service status:
    “`
    ● logid.service – Logitech Configuration Daemon
    Loaded: loaded (/lib/systemd/system/logid.service; enabled; vendor preset: enabled)
    Active: active (running) since Sat 2022-05-21 00:13:09 IST; 3min 19s ago
    Main PID: 4617 (logid)
    Tasks: 7 (limit: 76998)
    Memory: 780.0K
    CPU: 277ms
    CGroup: /system.slice/logid.service
    └─4617 /usr/local/bin/logid

    May 21 00:13:12 Mr logid[4617]: [WARN] Error adding device /dev/hidraw5: std::exception
    May 21 00:13:37 Mr logid[4617]: [ERROR] Caught HID++ 1.0 error while trying to initialize /dev/hidraw4:1: Resource error
    May 21 00:14:15 Mr logid[4617]: [ERROR] Caught HID++ 1.0 error while trying to initialize /dev/hidraw4:1: Resource error
    May 21 00:14:30 Mr logid[4617]: [ERROR] Caught HID++ 1.0 error while trying to initialize /dev/hidraw4:1: Resource error
    “`
    Would appreciate any help or at least how to remove drivers so I could get back where I were.

    Thanks

    1. Danish Shakeel Avatar

      I faced a similar issue; could not fix it. I ended up using it via Bluetooth over the Unifying Dongle.

  22. Peyton Avatar
    Peyton

    Running this command

    sudo apt install cmake libevdev-dev libudev-dev libconfig++-dev

    Somehow broke my Ubuntu so that gnome no longer worked. I am running Ubuntu jammy jellyfish

  23. CarstenD Avatar
    CarstenD

    is there a way to map the mouse wheel click to the right mouse button?

  24. Joren Miner Avatar
    Joren Miner

    I was able to get Horizontal scrolling to work perfectly, MX Master 3. Here’s the snippet, place on the same level as “smartshift” or “hiresscroll”:

    thumbwheel: {
    divert: false;
    invert: false;
    };

    Easy as that, in Ubuntu 18.04+ (also tested in Ubuntu 22.04)

  25. pLum0 Avatar
    pLum0

    Btw. Here my `thumbweel` configuration:

    “`
    thumbwheel:
    {
    divert: true;
    invert: false;
    left:
    {
    direction: “Left”;
    threshold: 1;
    interval: 2;
    mode: “OnInterval”;
    action =
    {
    type: “Keypress”;
    keys: [“KEY_LEFTSHIFT”, “KEY_TAB”];
    };
    };
    right:
    {
    direction: “Right”;
    mode: “OnInterval”;
    threshold: 1;
    interval: 2;
    action =
    {
    type: “Keypress”;
    keys: [“KEY_TAB”];
    };
    };
    touch: {
    type: “Keypress”;
    keys: [“KEY_LEFTALT”];
    }
    };
    “`

  26. pLum0 Avatar
    pLum0

    Thanks for your great article, helped me a lot configuring my mouse 🙂

    For me the Minimize/Maximize/Snap Windows feature is a bit weird, as it affects the active window instead of the one below the mouse.

    I made a small script using `xdotool` to fix this, check here: https://askubuntu.com/questions/1400834/how-to-snap-minimize-maximize-window-below-cursor

    I’m happy if you include that in your article if you wish.

    Cheers!

    1. Danish Shakeel Avatar

      That’s cool! I use snap min/max but I have not tried this. Thanks a lot. Adding it to the post 🙂

  27. Marco Post Avatar
    Marco Post

    I tried to change the gesture button to change desktop with ctrl+alt+right and ctrl+alt+left:
    {
    direction: “Right”;
    mode: “OnRelease”;
    action = {
    type: “Keypress”;
    keys: [ “KEY_LEFTCTRL”, “KEY_LEFTALT”, “KEY_DOWN” ];
    }
    }
    But it doesn’t work. Is that because it’s not possible, or do I have to reload the config?

    Thank

  28. Damian Avatar
    Damian

    Hi, big thanks for the post. My main OS for work is Linux Mint. The default DPI setting for the mouse is to slow for me and i wanted return mx master 3 to shop. But i set to 4000 and is great 😉

  29. Kamil Avatar
    Kamil

    VS code -> you can also add another shortcut by https://i.stack.imgur.com/H5CVb.png and than push button on mouse. You should add it for “Go back” -> BrowserBack and “Go Forward” -> BrowserForward. Than old keybord shorcut are still working. Thanks for all configuration.

  30. Eduardo Avatar
    Eduardo

    Hello Danish,

    I tried your approach but, unfortunately, it didn’t work for me. Regardless, it pointed me in the right direction to find a workaround that suits me.
    I ended up deleting everything related to the back and forward buttons on the .cfg file, leaving it up to the OS to define their behaviour. The OS then recognizes these buttons as general back and forward buttons from a generic mouse. This has the drawback of losing all the gestures bound to these buttons, the media keys in your example. This is not a big issue for me since I have them on the keyboard and I much rather have the back/forward buttons working properly.

    Bottom line, I got everything working as I need despite losing a few gestures. Thank you very much for the tutorial and your prompt response.

    P.S.: Sorry for the new post, I tried replying but it wasn’t working.

  31. Eduardo Avatar
    Eduardo

    Hello,

    It works quite well. I’m facing only one issue. My back and forward buttons seem to do nothing on VSCode now. It works with other mice and I believe it worked before I installed this (can’t properly remember).

    Apparently, this is a known issue and has a fix for windows:
    https://developercommunity.visualstudio.com/t/the-back-and-forward-buttons-on-my-logitech-mouse/126515
    https://social.msdn.microsoft.com/Forums/en-US/09a7ebee-9567-4704-be88-de54a16ca99e/logitech-mouse-button-assignments-ignored-by-vs

    But I was wondering since you state you use VS Code, have you faced the same issue?

    Thank you,
    Eduardo

    1. Danish Shakeel Avatar

      Hi, Eduardo.

      Thanks for pointing it out.

      The solution is to use Keypress instead of Gesture inside the Logid configuration.

      In the logid.cfg navigate to section // Back Button (cid: 0x53;).

      Change the configuration from:

      gestures: (
      {
      direction: "None";
      mode: "OnRelease";
      action = {
      type: "Keypress";
      keys: [ "KEY_BACK" ];
      }
      }
      );
      };

      to


      action = {
      type: "Keypress";
      keys: [ "KEY_LEFTCTRL", "KEY_PAGEDOWN" ];
      };

      I have bound the ‘Back Button’ to the combo – ‘Control + Page Down’ here (which toggles the tab). You can bind it to anything and configure that inside VSCode Keybindings. The same can be done for Forward Button, and almost every other button. You will need Linux Input Event Codes, you can find them here – Linux Input Event Codes

      Regards,
      Danish Shakeel

      Edit: I have made changes to the post.

  32. bill Avatar
    bill

    great job man! thank you so much

  33. kamil Avatar
    kamil

    after type sudo logid i get (Im working on ubuntu)
    [INFO] Device found: Wireless Mouse MX Master 3 on /dev/hidraw5:255
    [WARN] Error ignored on detached thread/task: _readReport read failed: Input/output error
    [INFO] Device on /dev/hidraw5 disconnected
    [INFO] Device Wireless Mouse MWireless M not configured, using default config.
    [INFO] Device found: Wireless Mouse MWireless M on /dev/hidraw1:255
    [WARN] Error adding device /dev/hidraw1: std::exception
    [INFO] Device Wireless Mouse MWireless M not configured, using default config.
    [INFO] Device found: Wireless Mouse MWireless M on /dev/hidraw1:255
    [WARN] Error adding device /dev/hidraw1: Invalid function ID

    1. Danish Shakeel Avatar

      Try restarting the service using systemctl restart logid.service . It often fixes most of the issues.

  34. Kamil Avatar
    Kamil

    I think it doesnt work. I did step by step, and to check its working I updated invert: false, to true but nothin happend after this change. Should I restart or changes should be detected rapidly?

    1. Danish Shakeel Avatar

      You need to reapply the changes. They do not propagate automatically.

  35. Marius Avatar
    Marius

    Thanks for the great work, it works like a charm, horizontal scroll works to switch chrome tabs as well as long as the mouse pointer is in the tab area – a feature I was missing.

    I have MX Master 3 for Mac and there is one thing I noticed – this config doesn’t work at all if the mouse is paired via bluetooth but works perfectly with a logitech usb dongle. I’m using one from an old logitech mouse, one dongle can pair with several devices (the windows logitech application is needed for the dongle set up)

    1. Danish Shakeel Avatar

      Marius, can you try restarting the logid.service using systemctl restart logid.service ?

  36. Danish Shakeel Avatar

    It should work for ‘MX Master 3 for Mac’; however, there may be some Mac-specific changes that are creating issues. Will have to check…

  37. Hilal Avatar
    Hilal

    I tried it, but it didn’t work for MX Master 3 for Mac, any suggestions?

  38. Tobias Avatar
    Tobias

    Thanks, seems to work great so far! I can scroll sideways with the thumb wheel, for example on a wide webpage. Not sure that is what you mean as “won’t work”. Pressing the scroll wheel performs typical middle mouse button actions, like pasting the selection buffer, which is indispensable in my humble opinion. Again, I am not sure that is what you mean.

    1. Danish Shakeel Avatar

      The default functionality of these buttons, like horizontal scrolling in spreadsheets works as expected, but I did not find a way to configure it per app, like we can with Logitech Options.

Leave a Reply

Your email address will not be published. Required fields are marked *