Skip to content

Instantly share code, notes, and snippets.

@trustin
Last active June 5, 2024 15:38
Show Gist options
  • Save trustin/56ee795930b6eb186bc6a43cedd389f0 to your computer and use it in GitHub Desktop.
Save trustin/56ee795930b6eb186bc6a43cedd389f0 to your computer and use it in GitHub Desktop.
logiops settings for Logitech MX Anywhere 3 and 2 (/etc/logid.cfg)
devices: ({
name: "MX Anywhere 3";
hiresscroll: {
hires: true;
invert: false;
target: false;
up: {
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
axis_multiplier: 1;
};
down: {
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
axis_multiplier: -1;
};
};
dpi: 1600;
buttons: (
// Gesture button -> Middle button
{
cid: 0xc4;
action = {
type: "Keypress";
keys: ["BTN_MIDDLE"];
};
},
// Backward button
{
cid: 0x53;
action = {
type: "Keypress";
keys: ["KEY_BACK"];
};
},
{
cid: 0x54;
action = {
type: "Keypress";
keys: ["KEY_BACK"];
};
},
// Forward button
{
cid: 0x56;
action = {
type: "Keypress";
keys: ["KEY_FORWARD"];
};
},
{
cid: 0x57;
action = {
type: "Keypress";
keys: ["KEY_FORWARD"];
};
}
);
},
{
name: "Wireless Mouse MX Anywhere 2";
hiresscroll: {
hires: true;
invert: false;
target: false;
up: {
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
axis_multiplier: 1;
};
down: {
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
axis_multiplier: -1;
};
};
dpi: 1600;
buttons: (
// Backward button
{
cid: 0x53;
action = {
type: "Keypress";
keys: ["KEY_BACK"];
};
},
{
cid: 0x54;
action = {
type: "Keypress";
keys: ["KEY_BACK"];
};
},
// Forward button
{
cid: 0x56;
action = {
type: "Keypress";
keys: ["KEY_FORWARD"];
};
},
{
cid: 0x57;
action = {
type: "Keypress";
keys: ["KEY_FORWARD"];
};
}
);
});
@trustin
Copy link
Author

trustin commented Aug 6, 2021

Install logiops first. This file results in fairly straight behavior:

  • Forward button triggers KEY_FORWARD;
  • Backward button triggers KEY_BACKWARD;
  • Gesture button (the small button right below the wheel) triggers BTN_MIDDLE; and
  • Wheel button does nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment