Disabling Logitech M720 thumb button on Linux
user: I bought a Logitech Precision Pro M720 mouse and I mainly plan to use it on my Debian 13 Linux laptop. But I want to sometimes use in on MS Windows.
The MS Windows, I have already setup and installed the Logi Options+ software, and I have that all figure out.
I'm using the mouse fine via Bluetooth on both my Windows PC and Linux laptop.
I simply have one problem. The thumb button on the mouse, I simply want to disable while I'm using it on Linux. I already set it to "Do nothing" on Windows, and I was hoping for the setting to stay in the mouse. but I just found out that the setting is not carrying over when I switch it.
What is happening while I'm using it on Linux, I keep accidentally clicking the thumb button and the various applications that I'm working in do this brief flash of the menu items along the top. This behavior is really undesirable, so I would like your advice on how to simply disable the thumb button on this mouse while using it on Linux.
assistant: I’m checking the current Linux-side options for the M720 so I can give you the cleanest fix instead of guessing. The main thing I want to pin down is whether that thumb button is being seen as a normal mouse button or a keyboard-like “gesture” event under Linux.
assistant: I found the likely cause already: on Linux, that M720 thumb button is often not treated like an ordinary mouse button at all. It commonly shows up as a separate keyboard-style shortcut event, which is why your Windows “do nothing” setting is not following the mouse over.
assistant: What’s happening is the annoying part: your Windows Logi Options+ setting is **not** being stored in the mouse the way you hoped. Solaar’s docs explicitly note that Logitech settings are tracked **independently on each computer**, so a setting changed on Windows does not automatically carry over to Linux. On Linux, the M720 thumb/gesture button is also often exposed as a **keyboard-like shortcut event** rather than a normal mouse button, which is why it can trigger desktop UI behavior instead of acting like a standard button.
The cleanest fix depends on whether your Debian session is **X11** or **Wayland**. Run this first:
```bash
echo $XDG_SESSION_TYPE
```
If it says **x11**, you can usually solve this by disabling the M720’s extra **keyboard interface** while leaving normal mouse movement and clicks alone. That exact workaround has been used on the M720 before, because the device presents itself as both a mouse and a keyboard on Linux.
For **X11**, do this:
```bash
xinput list
```
Look for **Logitech M720 Triathlon** under both sections:
- **Virtual core pointer** → leave this one alone
- **Virtual core keyboard** → this is the one to disable
Then run:
```bash
xinput disable ID_NUMBER
```
Replace `ID_NUMBER` with the M720 entry that appears under **Virtual core keyboard**. That should stop the thumb button from generating that bogus shortcut while keeping the mouse itself usable.
If that works and you want it automatic at login, make yourself a tiny script:
```bash
nano ~/disable-m720-thumb.sh && chmod +x ~/disable-m720-thumb.sh
```
Paste this in, using your real keyboard-interface ID:
```bash
#!/bin/bash
xinput disable 19
```
Then add that script to KDE/GNOME autostart. That is the simplest durable fix on X11.
If `echo $XDG_SESSION_TYPE` says **wayland**, `xinput` is not the right tool. In that case, the easiest practical route on Debian is usually **input-remapper**, which supports both **X11 and Wayland**, has a GUI, and can auto-apply mappings w…
user: make a cool looking infographic for my blog. I think your information will be useful for people searching about this same issue.
assistant: Yes — you’re very close.
What you want to do in that screen is **map the recorded thumb-button event to `disable`**.
In Input Remapper, the right-side **Output** area is where you type the replacement action. The project’s usage docs say to enter the desired mapping in the output text box, and it explicitly supports mapping a key/input to **`disable`** so it does nothing. It also works on **Wayland**, which matches your session.
Do this:
1. Make sure that left-side row stays selected:
`Control_L + Alt_L + Tab`
2. On the right side, stay on **Key or Macro**.
3. In the **output text field**, type exactly:
```text
disable
```
4. Leave **Target** as **keyboard**.
5. Press **Enter** if needed, then click **Apply**.
6. Test the thumb button.
If it works, turn on **Autoload** for that preset so it comes back automatically after login/device reconnect. Input Remapper saves changes automatically, and **Apply** is what activates the mapping.
Your earlier terminal message:
```text
ERROR: Cannot apply empty preset file
```
most likely happened because the preset existed, but it didn’t yet have a real output mapping. Once you set the output to `disable`, that part should stop being “empty.” That part is my inference from your log.
One important detail: since that thumb button was recorded as the combo **`Control_L + Alt_L + Tab`**, disabling that recorded input is the right move. Input Remapper’s docs specifically mention using **`disable`** to suppress unwanted side effects from recorded inputs/combinations.
If the GUI acts weird, do this order exactly:
- click **Stop**
- click the blue mapping row
- click the little **pencil/edit** icon
- type `disable` in the output field
- click **Apply**
If you want, send one more screenshot after you type `disable` on the right, and I’ll verify it before you click Apply.
user: it looks like I'm close, but it keeps putting BTN_LEFT when I click in that box to type disable
assistant: Yep — that means the GUI is still **capturing your mouse click as input**, so when you click in the box it records `BTN_LEFT` instead of letting you type. Input Remapper’s docs say that when you want to modify the **Input** side of a mapping, you need to use **Stop** so the app can read the original input again; otherwise the remapper/injector can interfere with normal editing. The docs also say the **Output** textbox on the right is where you type the replacement mapping, and then click **Apply** to activate it.
Do it in this exact order:
1. Click **Stop** first.
2. Click the blue row that shows `Control_L + Alt_L + Tab`.
3. Press **Tab** on your keyboard until the cursor/focus lands in the **Output** field on the right.
4. Type:
```text
disable
```
5. Press **Enter**.
6. Click **Apply**.
The key trick is: **do not click around after you hit Record unless you actually want to record a new input**. The docs explicitly say the Output box is typed into directly, and `disable` is a valid mapping that makes the input do nothing.
Also, your recorded event is a **combination** (`Control_L + Alt_L + Tab`). The docs note that combinations can have side effects, and one supported way to eliminate those side effects is to map the relevant input to **`disable`**.
If the field is still fighting you, use this fallback:
- Click **Delete** to remove that mapping row.
- Click **+ Add**
- Click **Record**
- Press only the thumb button once
- **Do not click inside the window after that**
- Use **Tab** to move to the Output field
- Type `disable`
- Press **Apply**
One more thing: if you accidentally get stuck in a bad capture state, the docs list **Ctrl+Del** as a shortcut to stop injection while the GUI is focused.
Send me one more screenshot after you hit **Stop** and after you’ve tabbed into the Output field, and I’ll tell you exactly what to press next.
user: when I did that, I saw it say "TAB", then it just put "e" as the mapped key for my typing in "disable" There is no way to stop it.
assistant: Yeah — stop fighting the GUI. We’re past the point where clicking around is helping.
Input Remapper explicitly supports editing its JSON config files directly, preset files live under `~/.config/input-remapper-2/presets/...`, and `disable` is a valid `output_symbol` that makes an input do nothing. It also has a CLI to start a preset without relying on the GTK window.
Do this instead.
1. Close Input Remapper completely.
2. Back up the preset file you already created:
```bash
cp "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/new preset.json" "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/new preset.json.bak"
```
3. Open the preset file:
```bash
nano "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/new preset.json"
```
4. In that file, find the mapping object for the thumb button and change its output to this exact value:
```json
"target_uinput": "keyboard",
"output_symbol": "disable"
```
A preset is just a JSON array of mapping objects, and each mapping uses fields like `input_combination`, `target_uinput`, and `output_symbol`. `disable` is specifically documented as a valid mapping value.
If your file currently has something like this:
```json
[
{
"input_combination": [
...
],
"target_uinput": "keyboard",
"output_symbol": "e"
}
]
```
change only the last line to:
```json
"output_symbol": "disable"
```
5. Save the file in nano:
`Ctrl+O`, Enter, then `Ctrl+X`.
6. Apply it from the terminal instead of the GUI:
```bash
input-remapper-control --command stop --device "Logitech M720 Triathlon Multi-Device Mouse"
input-remapper-control --command start --device "Logitech M720 Triathlon Multi-Device Mouse" --preset "new preset"
```
Those `input-remapper-control` commands are the documented CLI way to stop injection and start a specific preset for a device.
If you want, first show me the contents of that preset fil…
user: Ok, before I do your commands. Just letting you know from what I showed you in the screenshot. The thumb button is doing "Control L + Alt L + Tab"
So, i don't know if that makes a difference in what commands you want to give me.
assistant: Yes — that **does** matter.
Because Input Remapper sees your thumb button as the **combination** `Control_L + Alt_L + Tab`, not as one simple button, the “map the whole thing to `disable`” approach may still let parts of that combo leak through before the combination is considered complete. The docs explicitly warn that with combinations, inputs pressed before the combo is complete can be injected unmodified, and they recommend avoiding side effects by disabling the keys that are part of the combination individually. They also confirm that `disable` is a valid mapping value.
So don’t run my earlier generic edit yet. The safer move is to inspect the preset JSON first and then disable the **mouse-originated** `Control_L`, `Alt_L`, and `Tab` events properly. Input Remapper stores presets as JSON under `~/.config/input-remapper-2/presets/...`, and those mappings include the input combination and output fields we need to edit.
Run this and paste the output:
```bash
cat "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/new preset.json"
```
Once I see that file, I’ll give you the exact edited JSON and the exact start/stop commands for your mouse.
user: that command gives no output:
adam@laptop:~$ cat "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/new preset.json"
adam@laptop:~$
assistant: Good. That tells us something important:
`new preset.json` is effectively **empty**, which matches the earlier `Cannot apply empty preset file` errors. So there is nothing useful to edit yet. Input Remapper stores presets as JSON files under `~/.config/input-remapper-2/presets/...`, those files must be valid JSON, and `disable` is a valid mapping. The docs also warn that for combinations, the cleaner fix is often to **disable the keys in the combo individually** to avoid side effects.
Since your thumb button is showing up as:
```text
Control_L + Alt_L + Tab
```
the right move is to build a preset that disables those three injected keys from the mouse side. Input Remapper’s docs explicitly say combo keys can leak side effects before the combination is complete, and one recommended workaround is to disable the keys that make up the combination individually.
Run this first so we can see the device names exactly as Input Remapper sees them:
```bash
sudo input-remapper-control --list-devices
```
Then run this:
```bash
sudo evtest
```
Pick the **Logitech M720 Triathlon Multi-Device Mouse** entry if it appears, or the Logitech keyboard-like entry tied to the M720 if there is one. Then press the thumb button once and watch for three `EV_KEY` lines. We are looking to confirm the event codes for `LEFTCTRL`, `LEFTALT`, and `TAB`. The docs specifically recommend `evtest` to find the needed `type` and `code` values for mappings.
If `evtest` shows the thumb button generating the usual Linux keycodes for those three keys, then create the preset file directly like this:
```bash
nano "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/new preset.json"
```
Paste this:
```json
[
{
"input_combination": [
{ "type": 1, "code": 29 }
],
"target_uinput": "keyboard",
"output_symbol": "disable"
},
{
"input_combination": [
{ "type": 1, "code": 56 }
],
"target_uinput": "keyboard",
"output_symbol":…
user: hang on, before you said that, i did create a preset and named it thumb-button. then ran your commands.
adam@laptop:~$ cat "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/new preset.json"
cat: '/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/new preset.json': No such file or directory
adam@laptop:~$ sudo input-remapper-control --list-devices
[sudo] password for adam:
input-remapper keyboard
Logitech M720 Triathlon Multi-Device Mouse
SIGMACHIP USB Keyboard
Dell WMI hotkeys
Video Bus
DELL0815:00 044E:120A Mouse
Sleep Button
AT Translated Set 2 keyboard
adam@laptop:~$ sudo evtest
sudo: evtest: command not found
adam@laptop:~$
assistant: Yep — that changes the next step, and your latest output is useful.
The missing `new preset.json` is not a problem by itself. Since you renamed the preset to **thumb-button**, the real file should now be:
```bash
"/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/thumb-button.json"
```
That matches how Input Remapper stores presets: one JSON file per preset name under the device folder. Its CLI also uses the same device name and preset name when starting a preset.
Also, `evtest` is simply not installed on your Debian system yet. Debian ships it as the `evtest` package. Input Remapper’s own docs recommend using `evtest` to find the exact event `type` and `code` values when editing preset JSON directly.
Do these next, in this order:
```bash
ls -l "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/"
```
Then:
```bash
cat "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/thumb-button.json"
```
Then install `evtest`:
```bash
sudo apt install evtest
```
Then run:
```bash
sudo evtest
```
Pick the **Logitech M720 Triathlon Multi-Device Mouse** entry if it appears, then press the thumb button once. We want to see exactly what Linux reports for that button event. Input Remapper’s docs matter here because combinations are tricky: it only injects the mapping once the full combination is complete, and the docs explicitly say one way to prevent side effects is to disable the keys that make up the combination individually. It also explicitly supports mapping a key to `disable`.
So the plan now is not to guess. It is:
1. confirm the actual preset file exists,
2. inspect that preset,
3. install `evtest`,
4. capture the real event codes from the thumb button,
5. then I’ll give you the exact JSON to paste into `thumb-button.json`.
Paste back the output of these two commands:
```bash
cat "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Mul…
assistant: Perfect. Now we have the exact answer.
Your `evtest` output proves the thumb button is not a normal single mouse button on Linux. It is generating three keyboard events in sequence: `KEY_LEFTCTRL` (29), `KEY_LEFTALT` (56), and `KEY_TAB` (15). Your current preset file also shows only an `input_combination` with no `output_symbol`, so it is incomplete and won’t actually suppress anything.
Do this exact fix.
First, back up the preset:
```bash
cp "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/thumb-button.json" "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/thumb-button.json.bak"
```
Now open the preset:
```bash
nano "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/thumb-button.json"
```
Replace the entire file with this:
```json
[
{
"input_combination": [
{
"type": 1,
"code": 29,
"origin_hash": "c527e148deb113355972bb7908fcb5b9"
}
],
"target_uinput": "keyboard",
"output_symbol": "disable"
},
{
"input_combination": [
{
"type": 1,
"code": 56,
"origin_hash": "c527e148deb113355972bb7908fcb5b9"
}
],
"target_uinput": "keyboard",
"output_symbol": "disable"
},
{
"input_combination": [
{
"type": 1,
"code": 15,
"origin_hash": "c527e148deb113355972bb7908fcb5b9"
}
],
"target_uinput": "keyboard",
"output_symbol": "disable"
}
]
```
Save in nano with `Ctrl+O`, Enter, then exit with `Ctrl+X`.
Then apply it:
```bash
sudo input-remapper-control --command stop --device "Logitech M720 Triathlon Multi-Device Mouse"
sudo input-remapper-control --command start --device "Logitech M720 Triathlon Multi-Device Mouse" --preset "thumb-but…
user: I tested the button after this. Now the button is not doing anything. Thank you!
adam@laptop:~$ cp "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/thumb-button.json" "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/thumb-button.json.bak"
adam@laptop:~$ nano "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/thumb-button.json"
adam@laptop:~$ sudo input-remapper-control --command stop --device "Logitech M720 Triathlon Multi-Device Mouse"
sudo input-remapper-control --command start --device "Logitech M720 Triathlon Multi-Device Mouse" --preset "thumb-button"
[sudo] password for adam:
Connected to the service
Found "input-remapper keyboard", "Logitech M720 Triathlon Multi-Device Mouse", "SIGMACHIP USB Keyboard", "Dell WMI hotkeys", "Video Bus", "DELL0815:00 044E:120A Mouse", "Sleep Button", "AT Translated Set 2 keyboard"
Done
Connected to the service
Found "input-remapper keyboard", "Logitech M720 Triathlon Multi-Device Mouse", "SIGMACHIP USB Keyboard", "Dell WMI hotkeys", "Video Bus", "DELL0815:00 044E:120A Mouse", "Sleep Button", "AT Translated Set 2 keyboard"
Starting injection: "Logitech M720 Triathlon Multi-Device Mouse", "thumb-button"
Done
adam@laptop:~$ cat "/home/adam/.config/input-remapper-2/presets/Logitech M720 Triathlon Multi-Device Mouse/thumb-button.json"
[
{
"input_combination": [
{
"type": 1,
"code": 29,
"origin_hash": "c527e148deb113355972bb7908fcb5b9"
}
],
"target_uinput": "keyboard",
"output_symbol": "disable"
},
{
"input_combination": [
{
"type": 1,
"code": 56,
"origin_hash": "c527e148deb113355972bb7908fcb5b9"
}
],
"target_uinput": "keyboard",
"output_symbol": "disable"
},
{
"input_combination": [
…
assistant: Nice. That confirms the fix is solid.
Your Linux-side thumb button is now being suppressed by disabling the three keyboard events the M720 was emitting: Left Ctrl, Left Alt, and Tab. Your active preset file also looks correct. The next useful step is to turn on **Autoload** for that preset in Input Remapper so it reapplies automatically after login instead of needing the manual `input-remapper-control --command start ...` step each time. The maintainer describes Autoload as the way to have a preset apply when you log in, and the config uses an `autoload` entry under `~/.config/input-remapper-2/config.json`.
I’d keep these two files exactly as they are:
- `thumb-button.json`
- `thumb-button.json.bak`
That gives you a clean rollback in case you ever want the button back for Linux later.
user: ok, send the commands to autoload it
assistant: Run these as your normal user `adam`:
```bash
cp "/home/adam/.config/input-remapper-2/config.json" "/home/adam/.config/input-remapper-2/config.json.bak"
python3 - <<'PY'
import json
from pathlib import Path
cfg_path = Path("/home/adam/.config/input-remapper-2/config.json")
cfg = {}
if cfg_path.exists() and cfg_path.read_text().strip():
cfg = json.loads(cfg_path.read_text())
cfg.setdefault("version", "2.1.1")
cfg.setdefault("autoload", {})
cfg["autoload"]["Logitech M720 Triathlon Multi-Device Mouse"] = "thumb-button"
cfg_path.write_text(json.dumps(cfg, indent=4) + "\n")
print(f"Saved {cfg_path}")
PY
cat "/home/adam/.config/input-remapper-2/config.json"
```
You should now see an `autoload` section mapping your M720 to the `thumb-button` preset. That is how Input Remapper stores autoloaded presets in `~/.config/input-remapper-2/config.json`.
Now trigger autoload once without rebooting:
```bash
input-remapper-control --command autoload
```
If that does not work, run this one with sudo:
```bash
sudo input-remapper-control --command autoload
```
That command is the documented test path people use to force autoload immediately, and the service needs to be running for autoload to work.
If you want to verify the service is up, run:
```bash
sudo systemctl status input-remapper --no-pager
```
If the thumb button stays disabled after logout or reboot, you’re done. If it does not, paste the output of:
```bash
cat "/home/adam/.config/input-remapper-2/config.json"
sudo systemctl status input-remapper --no-pager
```
user: adam@laptop:~$ cp "/home/adam/.config/input-remapper-2/config.json" "/home/adam/.config/input-remapper-2/config.json.bak"
python3 - <<'PY'
import json
from pathlib import Path
cfg_path = Path("/home/adam/.config/input-remapper-2/config.json")
cfg = {}
if cfg_path.exists() and cfg_path.read_text().strip():
cfg = json.loads(cfg_path.read_text())
cfg.setdefault("version", "2.1.1")
cfg.setdefault("autoload", {})
cfg["autoload"]["Logitech M720 Triathlon Multi-Device Mouse"] = "thumb-button"
cfg_path.write_text(json.dumps(cfg, indent=4) + "\n")
print(f"Saved {cfg_path}")
PY
cat "/home/adam/.config/input-remapper-2/config.json"
Saved /home/adam/.config/input-remapper-2/config.json
{
"version": "2.1.1",
"autoload": {
"Logitech M720 Triathlon Multi-Device Mouse": "thumb-button"
}
}
adam@laptop:~$ input-remapper-control --command autoload
Connected to the service
Autoloading all
Done
adam@laptop:~$ sudo systemctl status input-remapper --no-pager
● input-remapper-daemon.service - Service to inject keycodes without the GUI application
Loaded: loaded (/usr/lib/systemd/system/input-remapper-daemon.service; enabled; preset: enabled)
Active: active (running) since Sun 2026-03-22 02:01:13 CDT; 1h 2min ago
Invocation: 72891a65abb3430abfbe9d03510ca36c
Main PID: 34118 (input-remapper-)
Tasks: 7 (limit: 9210)
Memory: 43M (peak: 48M)
CPU: 2.175s
CGroup: /system.slice/input-remapper-daemon.service
├─34118 /usr/bin/python3 /usr/bin/input-remapper-service
├─34119 /usr/bin/python3 /usr/bin/input-remapper-service
└─36309 /usr/bin/python3 /usr/bin/input-remapper-service
Mar 22 03:03:19 laptop input-remapper-service[34118]: Autoloading for all devices
Mar 22 03:03:20 laptop input-remapper-service[34118]: Found "input-remapper Logitech M720 Triathlon Multi-Device Mouse forwarded", "input-remapper keyboard", … 2 keyboard"
Mar 22 03:03:20 laptop input-remapper-service[34118]: Autoloading for…
assistant: That looks good. You’re done.
The important lines are these:
- `Autoloading for "Logitech M720 Triathlon Multi-Device Mouse"`
- `Loading preset from "/home/adam/.config/input-remapper-2/presets/.../thumb-button.json"`
- `Starting injecting the preset for "Logitech M720 Triathlon Multi-Device Mouse"`
Those are the lines that matter. They show your **adam** preset was found and loaded correctly.
The `/root/.config/input-remapper-2/config.json does not exist` message is almost certainly just noise, not a failure. Your real working config is under:
```bash
/home/adam/.config/input-remapper-2/
```
and the daemon clearly used that file successfully.
What I would do now:
1. Leave it alone.
2. Reboot or log out/log back in.
3. Test the thumb button again.
If the thumb button still does nothing after login, the autoload is working exactly as intended.
For normal use going forward, use the user-level command, not sudo:
```bash
input-remapper-control --command autoload
```
Your config belongs to `adam`, so that is the cleaner way.
If you want, you can also run this after reboot to confirm it’s still loading your preset:
```bash
systemctl status input-remapper-daemon --no-pager
```
One small correction for future reference: the service name on your machine is:
```bash
input-remapper-daemon
```
not just `input-remapper`.
So overall: **the preset is loading, the thumb button is disabled, and the root warning is not your real problem.**
Showing first 23 of 73 messages. View the full conversation at https://mcwai.org/ai-conversation/disabling-logitech-m720-thumb-button-on-linux