Logitech G HUB middle click in macOS Terminal

I have a middle mouse (wheel) button macro for triple clicking, copying to the clipboard, and trimming whitespace. It works great, thanks to Keyboard Maestro. Logitech's G HUB software doesn't allow for this on its own on macOS, but it does on Windows. Ugh.

Anyway, I just discovered that the G HUB software invokes a clipboard paste command when you middle click within macOS Terminal, and weird/dangerous things happen when it's combined with my KM triple click macro.

I can't figure out a way to disable this unwanted, default paste feature in G HUB. Has anyone else run into this before?

Generally it is best to simply not install any of Logitech’s drivers and use Keyboard Maestro’s USB Device Key triggers.

If you have to install the driver software for some specific feature, then the only option is to disable the behaviour in the driver. Note that Keyboard Maestro may not be able to see the device if the driver is installed and takes exclusive control over the device.

It's not possible to disable Logitech's default Middle Click behavior, but I solved the problem by creating a keyboard macro in G HUB (F4), assigning that to the middle mouse button, and taking over that new keyboard shortcut within Keyboard Maestro for my triple click, copy, trim macro.

I have a G703 Lightspeed mouse and the wirelessly charging Powerplay mousepad. I don't wish to uninstall the G HUB driver. There are a few things I like about it, such as setting the DPI Speed to 2800 and Report Rate to 1000, configuring the lights on the mouse and mouse pad, keeping up to date with firmware, etc.