PixlOne / logiops

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

KEY_PLAYPAUSE not working #398

Closed soype closed 1 year ago

soype commented 1 year ago

Hi, I've recently reinstalled everything on my linux PC and I can't get the "KEY_PLAYPAUSE" command to work on my gestures. All the other commands work. It does work on the keyboard.

Any ideas on what I should change?

Debug:


-event25  KEYBOARD_KEY            +1.742s   KEY_PLAYPAUSE (164) pressed
 event25  KEYBOARD_KEY            +1.742s   KEY_PLAYPAUSE (164) released
-event24  KEYBOARD_KEY            +1.742s   KEY_PLAYPAUSE (164) pressed
 event24  KEYBOARD_KEY            +1.742s   KEY_PLAYPAUSE (164) released
-event23  KEYBOARD_KEY            +1.742s   KEY_PLAYPAUSE (164) pressed
 event23  KEYBOARD_KEY            +1.742s   KEY_PLAYPAUSE (164) released
-event7   KEYBOARD_KEY            +2.486s   KEY_PLAYPAUSE (164) pressed
 event7   KEYBOARD_KEY            +2.586s   KEY_PLAYPAUSE (164) released

My config

devices: (
{
    name: "Wireless Mouse MX Master 3";
    smartshift:
    {
        on: false;
        threshold: 30;
        torque: 50;
    };
    hiresscroll:
    {
        hires: true;
        invert: true;
        target: false;
    };
    dpi: 1200;

    buttons: (
        {
            cid: 0xc3;
            action =
            {
                type: "Gestures";
                gestures: (
                    {
                        direction: "Up";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_UP"];
                        };
                    },
                    {
                        direction: "Down";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_DOWN"];
                        };
                    },
                    {
                        direction: "Right";
                        mode: "OnRelease";
                        action =
                        {
                            type: "Keypress";
                            keys: ["KEY_PLAYPAUSE"];
                        }
                    },
                    {
                        direction: "Left";
                        mode: "OnRelease";
                        action =
                        {
                            type: "CycleDPI";
                            dpis: [400, 600, 800, 1000, 1200, 1400, 1600];
                        };
                    }
                );
            };
        },
        {
            cid: 0xc4;
            action =
            {
                type: "Keypress";
                keys: ["KEY_A"];
            };
        }
    );
}
);
S-trace commented 1 year ago

Please try this config snippet:

{
    # Forward
    cid: 0x56;
    action:
    {
       type: "Gestures";
       threshold: 50
       gestures: (
           {
               direction: "Up";
               mode: "OnRelease";
               interval: 150;
               action:  {
                   type: "Keypress";
                   keys: [ "KEY_PLAYPAUSE" ];
               };
           },
           {
               direction: "Down";
               mode: "OnRelease";
               interval: 150;
               action:  {
                   type: "Keypress";
                   keys: [ "KEY_PLAYPAUSE" ];
               };
           },
           {
               direction: "Left";
               mode: "OnRelease";
               interval: 150;
               action:  {
                   type: "Keypress";
                   keys: [ "KEY_PREVIOUSSONG" ];
               };
           },
           {
               direction: "Right";
               mode: "OnRelease";
               interval: 150;
               action:  {
                   type: "Keypress";
                   keys: [ "KEY_NEXTSONG" ];
               };
           },
           {
               direction: "None";
               mode: "OnRelease";
               action =
               {
                   type: "Keypress";
                   keys: [ "KEY_FORWARD" ];
               }
           }
       );
   };
},

It works fine on my machine (logid v0.3.2-2-g9f09591). Of course, you should change cid to your cid.

soype commented 1 year ago

Thanks. I reinstalled PopOS due to another reason and this config worked.