PixlOne / logiops

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

Switching tabs in browser with side wheel #266

Open vmelfx opened 3 years ago

vmelfx commented 3 years ago

Hello everyone. Is there anyone who use side wheel in mx master 3 to switch tabs in browser? Browser doesn't matter. Can you help me with config? I've found config for changing volume with side wheel and tried to chage it for switching tabs. Literally i've got what was searching for but it works completly inadequate (on the video you can see what i'm talking about) https://user-images.githubusercontent.com/89578357/130939572-171cd3df-84dd-4fc3-826f-4e21ebcb947d.mp4 Here is my config:

devices: (
{
    name: "Wireless Mouse MX Master 3";
    smartshift:
    {
        on: true;
        threshold: 30;
    };
    hiresscroll:
{
    hires: true;
    invert: false;
    target: true;
    up: {
        mode: "Axis";
        axis: "REL_WHEEL_HI_RES";
        axis_multiplier: 3;
    },
    down: {
        mode: "Axis";
        axis: "REL_WHEEL_HI_RES";
        axis_multiplier: -3;
    },
};
thumbwheel: {
    divert: true;
    invert: false;
    left: {
        threshhold: 1;
        interval: 4;
        direction: "Left";
        mode: "OnInterval";
        action = 
                {
                type: "Keypress";
                keys: ["KEY_LEFTCTRL", "KEY_PAGEUP"]
                };
    };
    right: {
        threshhold: 1;
        interval: 4;
        direction: "Right";
        mode: "OnInterval";
        action =
                { 
                type: "Keypress";
                keys: ["KEY_LEFTCTRL", "KEY_PAGEDOWN"]
                };
    };
};

    dpi: 1700;

    buttons: (
        {
            cid: 0xc3;
            action =
            {
                type: "Gestures";
                gestures: (
                    {
                        direction: "Up";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTMETA"];
                        };
                    },
                    {
                        direction: "Down";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTCTRL", "KEY_F12"];
                        };
                    },
#                    {
#                        direction: "Left";
#                        mode: "OnRelease";
#                        action =
#                        {
#                            type: "CycleDPI";
#                            dpis: [50, 500, 1000, 1500, 2000, 3000, 4000];
#                        };
#                    },
                    {
                        direction: "Left";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTMETA", "KEY_LEFT"];
                        };
                    },

#                    {
#                        direction: "Right";
#                        mode: "OnRelease";
#                        action =
#                        {
#                            type = "ToggleHiresScroll";
#                        }
#                    },
                    {
                        direction: "Right";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_LEFTMETA", "KEY_RIGHT"];
                        }
                    },

                    {
                        direction: "None"
                        mode: "NoPress"
                    }
                );
            };
        },
        {
            cid: 0xc4;
            action =
            {
                type : "Keypress" ;
                keys: ["KEY_LEFTCTRL", "KEY_W"];
            };
        },
        {
            # Next tab instead of fwd in history, Comment to default behavior
            cid: 0x53;
            action =
            {
                type :  "Keypress";
                keys: ["KEY_LEFTALT", "KEY_LEFT"];
            };
        },
        {
            # Previous tab instead of back in history, Comment to default behavior
            cid: 0x56;
            action =
            {
                type :  "Keypress";
                keys: ["KEY_LEFTALT", "KEY_RIGHT"];
            };
        }
    );
},
{
# Another device to configure
name: "Other Logitech USB Receiver";

}
);

If you see wrong things in my config, please tell me and i'll fix them. P.S: installed from aur repository

mateuscomh commented 3 years ago

Im use mx 2S but im follow this, im need too

mateuscomh commented 3 years ago

@vmelfx have you try to increase value on threshhold: on your config thumbwheel, and reload configuration?

vmelfx commented 3 years ago

I've tried. Now i set it to 20000 and it seems like after some value it doesn't take any effect. Now it's more useable, but still too much sensitive. It would be great to hear @PixlOne opinion about this.

iFwu commented 3 years ago

The "interval" setting in the thumbwheel section is not working properly. See https://github.com/PixlOne/logiops/issues/231