PixlOne / logiops

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

Config for disability zoom in KDE? #455

Closed b9AcE closed 3 months ago

b9AcE commented 4 months ago

Hi!

I'm visually impaired, at hospital-gave-me-a-white-cane level, so ever since I got that I have been relying very heavily on the Windows 10 accessibility fullscreen zoom hotkeys (<win>+<+> to zoom in and <win>+<esc> to end zoom) being bound to the gesture button on my Logitech mice, configured so whenever I need to zoom in, I just hold down the gesture button over whatever needs magnification and move the mouse upwards, then when I am done with being zoomed in hold down the gesture button and move the mouse downwards to end the zooming. Now Microsoft is making Windows no longer an option and so I must switch back to Linux as desktop but I really, really need to be able to zoom with my Logitech MX Vertical mouse like that. The keyboard-only native hotkeys for zooming builtin into KDE are insufficient in several ways.

This seems like it should be possible through logiops, right? I was looking at doing the equivalent of what I did in "Logitech Options" on Windows, but instead in KDE by defining the gestures-button as "<Meta>+<+>" for the up gesture and "<Meta>+0" (zero) for down, but I don't know what those keys are called in the format of logid.cfg, while such a quantity of text as in the example-config and wiki is practically insurmountable since I got the disability even though I was a UNIX SysAdmin with Linux-focus before that, soo... anyone feel like assisting an officially blind person, me, with this, please? Thanks!

klinkigt commented 3 months ago

Hi,

hope this helps:

    // Gesture button (hold and move)
    {
      cid: 0xc3;
      action =
      {
        type: "Gestures";
        gestures: (

          {
            direction: "Up";
            mode: "OnInterval";
            interval: 20;
            action =
            {
                type: "Keypress";
                keys: ["KEY_LEFTMETA", "KEY_PLUS"];
            };
          },
          {
            direction: "Down";
            mode: "OnInterval";
            interval: 20;
            action =
            {
                type: "Keypress";
                keys: ["KEY_LEFTMETA", "KEY_0"];
            };
          },
        );
      };
    },

Those are only the part you have asked for mapping for META+"+" and META+0 to the gesture key for up and down movement. If you have already a section for the gesture key, only add the inner part.

May share your config here, than I can have a look.

Best

b9AcE commented 3 months ago

Hey! Unfortunately I gave up on this already and without a usable zoom functionality I was forced to temporarily go back to Windows while hoping the situation KDE situation improves before Windows 10's support ends, so I will not be able to test the configuration that you so kindly provided for me now @klinkigt, but I will save it and test it the next time I give the transition an attempt. Thank you very, very much!