Skip to content

Instantly share code, notes, and snippets.

@Elijas
Last active July 2, 2021 20:05
Show Gist options
  • Save Elijas/563dd13c3b7492bdb43e3aa8e861f844 to your computer and use it in GitHub Desktop.
Save Elijas/563dd13c3b7492bdb43e3aa8e861f844 to your computer and use it in GitHub Desktop.
Gesture macros for all keys for Logitech MX Master 3, Logiops linux driver
// Location: /etc/logid.cfg
devices: ({
name: "MX Master 3";
smartshift: { on: true; threshold: 6; };
hiresscroll: { hires: false; 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_LEFTMETA" ];}},
{ direction: "Up"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTMETA", "KEY_D" ];}},
{ direction: "Down"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTMETA", "KEY_F" ];}},
{ direction: "Left"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTMETA", "KEY_A" ];}},
{ direction: "Right"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTMETA", "KEY_S" ];}}
);};},
// Back button
{ cid: 0x53; action = { type: "Gestures"; gestures: (
{ direction: "None"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTALT", "KEY_TAB" ];}},
{ direction: "Up"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTCTRL", "KEY_LEFTSHIFT", "KEY_LEFTMETA", "KEY_LEFT" ];}},
{ direction: "Down"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTCTRL", "KEY_LEFTSHIFT", "KEY_LEFTMETA", "KEY_RIGHT" ];}},
{ direction: "Left"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_BACK" ];}},
{ direction: "Right"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_FORWARD" ];}}
);};},
// Thumb button
{ cid: 0xc3; action = { type: "Gestures"; gestures: (
{ direction: "None"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTMETA", "KEY_W" ];}},
{ direction: "Up"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTSHIFT", "KEY_LEFTMETA", "KEY_D" ];}},
{ direction: "Down"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTSHIFT", "KEY_LEFTMETA", "KEY_F" ];}},
{ direction: "Left"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTSHIFT", "KEY_LEFTMETA", "KEY_A" ];}},
{ direction: "Right"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTSHIFT", "KEY_LEFTMETA", "KEY_S" ];}}
);};},
// Top button
{ cid: 0xc4; action = { type: "Gestures"; gestures: (
{ direction: "None"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_ENTER" ];}},
{ direction: "Up"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTCTRL", "KEY_INSERT" ];}},
{ direction: "Down"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTSHIFT", "KEY_INSERT" ];}},
{ direction: "Left"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_PLAYPAUSE" ];}},
{ direction: "Right"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_NEXTSONG" ];}}
);};},
// Middle mouse button
{ cid: 0x52; action = { type: "Gestures"; gestures: (
{ direction: "None"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "BTN_MIDDLE" ];}},
{ direction: "Up"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTSHIFT", "KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_UP" ];}},
{ direction: "Down"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTMETA", "KEY_LEFTCTRL", "KEY_UP" ];}},
{ direction: "Left"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTCTRL", "KEY_LEFTMETA", "KEY_LEFT" ];}},
{ direction: "Right"; mode: "OnRelease"; action = { type: "Keypress"; keys: [ "KEY_LEFTCTRL", "KEY_LEFTMETA", "KEY_RIGHT" ];}}
);};}
);
});
@tyler-dot-earth
Copy link

Stumbled upon this example configuration but found that it was no longer valid (I think, largely, due to the device name being incorrect).

I maintain my own configuration file that works for the MX Master 3:
https://gist.github.com/tsnieman/a01b5414960b265b37d5148779d3c687

maybe try it if @Elijas' isn't working for you 👍

@Elijas
Copy link
Author

Elijas commented Dec 6, 2020

Stumbled upon this example configuration but found that it was no longer valid (I think, largely, due to the device name being incorrect).

I maintain my own configuration file that works for the MX Master 3:
https://gist.github.com/tsnieman/a01b5414960b265b37d5148779d3c687

maybe try it if @Elijas' isn't working for you +1

Thank you!

@TheBubblePopped
Copy link

hey @tsnieman quick question. Why did u use that name?

My dpi won't change for some reason.
The name for my device is (if i hit xinput in the terminal)
Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech MX Master 3 id=8 [slave pointer (2)]
⎜ ↳ LogiOps Virtual Input id=12 [slave pointer (2)

@tyler-dot-earth
Copy link

@TheBubblePopped - I believe I found it referenced within an issue of the logiops repository (i.e. i didn't base the name in my config on a terminal output)

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