Skip to content

Instantly share code, notes, and snippets.

@lyquangthai1993
Last active April 18, 2024 03:10
Show Gist options
  • Save lyquangthai1993/9095d94245fddce2a3142af5b153890e to your computer and use it in GitHub Desktop.
Save lyquangthai1993/9095d94245fddce2a3142af5b153890e to your computer and use it in GitHub Desktop.
/etc/logid.cfg for MX Master 2s
devices: ({
name: "Wireless Mouse MX Master 2S";
//sudo systemctl enable --now logid
// A lower threshold number makes the wheel switch to free-spin mode
// quicker when scrolling fast.
smartshift: {
on: true;
threshold: 15;
};
hiresscroll: {
hires: true;
invert: false;
target: true;
up:
{
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
axis_multiplier: 1;
},
down:
{
mode: "Axis";
axis: "REL_WHEEL_HI_RES";
axis_multiplier: -1;
},
};
// Higher numbers make the mouse more sensitive (cursor moves faster),
// 4000 max for MX Master 3.
dpi: 1500;
buttons: (
// Modify top button on the mouse, it could support gestures as well.
// { cid: 0xc4; action = { type: "Keypress"; keys: ["BTN_BACK"]; }; },
// Enable thumb gestures
{
cid: 0xc3;
action = {
type: "Gestures";
gestures: ({
direction: "Left";
mode: "OnRelease";
action = {
type: "Keypress";
keys: ["KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_LEFT"];
};
},
{
direction: "Right";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_RIGHT" ]; // snap window to right
}
},
{
direction: "Down";
mode: "OnInterval";
interval: 100;
action = {
type: "Keypress";
keys: [ "KEY_VOLUMEDOWN" ]; // snap window to right
}
},
{
direction: "Up";
mode: "OnInterval";
interval: 100;
action = {
type: "Keypress";
keys: [ "KEY_VOLUMEUP" ]; // snap window to right
}
},
{
direction: "None";
mode: "OnRelease";
action = {
type: "Keypress";
keys: ["KEY_LEFTMETA"]
};
});
};
}
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment