PixlOne / logiops

An unofficial userspace driver for HID++ Logitech devices
GNU General Public License v3.0
3.31k stars 263 forks source link

Two keys gestures can be implemented in the MX3 profile, but adding the other 3 key doesn't work. #459

Open callengre opened 3 months ago

callengre commented 3 months ago

debug info

0[DEBUG] CID  | reprog? | fn key?   | mouse key? | gesture support?
1[DEBUG] 0x50 |Left  Mouse Button   | YES        | 
2[DEBUG] 0x51 |Right Mouse Button   | YES        | 

3[DEBUG] 0x52 | YES Middle MButton  | YES        | YES
4[DEBUG] 0x53 | YES Back Button     | YES        | YES
5[DEBUG] 0x56 | YES Forward Button  | YES        | YES
6[DEBUG] 0xc3 | YES Gesture Button  | YES        | YES  -----
7[DEBUG] 0xc4 | YES ToggleSmartShift| YES        | YES  ----

8[DEBUG] 0xd7 | YES Switch Receivers|            | YES

9[DEBUG] Thumb wheel detected (0x2150), capabilities:
a[DEBUG] timestamp | touch | proximity | single tap
b[DEBUG] YES       | YES   | YES       | YES       
c[DEBUG] Thumb wheel resolution: native (18), diverted (120)

Works fine key ID

cid: 0xc3;   #  Gesture Button 
 cid: 0xc4;  #  ToggleSmartShift

Not work key ID

cid: 0x56;   # Forward Button
cid: 0x53;  # Back Button
cid: 0x52;  #  Middle MButton

The whole configure file

devices: (
{
    name: "Wireless Mouse MX Master 3";
    smartshift:
    {
        on: true;
        threshold: 30;
        torque: 50;
    };
    hiresscroll:   # Scroll wheel configuration. Note that if you use a screen with a very high DPI, it's not the resolution, it's the DPI. Enabling the high resolution scroll wheel causes the scroll wheel speed to be very fast, which can be turned off and adjusted back to normal speed.
    {
        hires: true;   # Enable High Resolution Wheel
        invert: false;  # Do not enable the reverse wheel
        target: false;  # If the scroll wheel has no other function
    };
    dpi: 1000;
    buttons: (
        {
            cid: 0xc3;   #  Gesture Button 
            action =
            {
                type: "Gestures";
                gestures: (
                    {
                        direction: "Up";
                        mode: "OnRelease";
                        action =
                        {
                            type:"Keypress";
                            keys:["KEY_LEFTMETA", "KEY_D"]; # Displays the desktop
                        };
                    },
                    {
                        direction: "Down";
                        mode: "OnRelease";
                        action =
                        {
                            type:"Keypress";
                            keys:["KEY_LEFTMETA", "KEY_S"]; # Multitask view
                        };
                    },
                    {
                        direction: "Left";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTMETA", "KEY_LEFT"]; # Left virtual desktop
                        };
                    },
                    {
                        direction: "Right";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTMETA", "KEY_RIGHT"]; # Right virtual desktop
                        }
                    },
                    {
                    direction:"None";
                    mode="OnRelease";
                    action=
                        {
                        type:"Keypress";
                        keys:["KEY_LEFTMETA", "KEY_D"]; #  Unknown definition, to be switched
                        }
                    }
                );
            };
        },
        {
            cid: 0xc4;  #  ToggleSmartShift
            action =
            {
                type: "Gestures";
                gestures: (
                    {
                        direction: "Up";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTMETA", "KEY_UP"];  # Maximize the window
                        };
                    },
                    {
                        direction: "Down";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTMETA", "KEY_DOWN"]; # The window is normal
                        };
                    },
                    {
                        direction: "Left";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTCTRL", "KEY_PAGEUP"];   # Labels toggle left
                        };
                    },
                    {
                        direction: "Right";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTCTRL", "KEY_PAGEDOWN"];  # The right side of the label toggles
                        }
                    },
                    {
                    direction:"None";
                    mode="OnRelease";
                    action=
                        {
                        type:"Keypress";
                        keys:["KEY_LEFTCTRL", "KEY_W"]; # Close the window directly
                        }
                    }
                );
            };
        }
    );
}
);

Section added at the back, This Section was not working. How to change it to work ? thanks everyone.

,
        {
            cid: 0x56;   # Forward Button
            action =
            {
                type: "Gestures";
                gestures: (
                    {
                        direction: "Up";
                        mode: "OnRelease";
                        action =
                        {
                            type: "CycleDPI";         # Automatically adjust DPI resolution
                            dpis: [400, 600, 800, 1000, 1200, 1400, 1600];
                        };
                    },
                    {
                        direction: "Down";
                        mode: "OnRelease";
                        action =
                        {
                            type = "ToggleSmartshift";   # Activate automatic fast scroll wheel
                        };
                    },
                    {
                        direction: "Left";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTMETA", "KEY_E"];  # Resource Manager
                        };
                    },
                    {
                        direction: "Right";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_T"];   # Terminal Manager
                        }
                    },
                    {
                        direction: "None"    # Leave blank
                        mode: "NoPress"
                    }
                );
            };
        },
        {
            cid: 0x53;  # Back Button
            action =
            {
                type: "Gestures";
                gestures: (
                    {
                        direction: "Up";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";      # Picture and text recognition
                            keys: ["KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_C"];
                        };
                    },
                    {
                        direction: "Down";
                        mode: "OnRelease";
                        action =
                        {
                            type = "Keypress";   # Read aloud by voice
                            keys: ["KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_P"];
                        };
                    },
                    {
                        direction: "Left";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";      # Voice dictation
                            keys: ["KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_D"];
                        };
                    },
                    {
                        direction: "Right";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";       # Text translation
                            keys: ["KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_U"];
                        }
                    },
                    {
                        direction: "None"   # Leave blank
                        mode: "NoPress"
                    }
                );
            };
        },
        {
            cid: 0x52;  #  Middle MButton
            action =
            {
                type: "Gestures";
                gestures: (
                    {
                        direction: "Up";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";     # Clipboard
                            keys: ["KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_V"];
                        };
                    },
                    {
                        direction: "Down";
                        mode: "OnRelease";
                        action =
                        {
                            type = "Keypress";    # whatsapp
                            keys: ["KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_W"];
                        };
                    },
                    {
                        direction: "Left";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";     # UOS AI
                            keys: ["KEY_LEFTMETA", "KEY_C"];
                        };
                    },
                    {
                        direction: "Right";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";     # UOS AI talk
                            keys: ["KEY_LEFTCTRL","KEY_LEFTMETA", "KEY_C"];
                        }
                    },
                    {
                        direction: "None"    # Leave blank
                        mode: "NoPress"
                    }
                );
            };
        }