Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logitech triple-click macro on macOS #138

Open
mhillebrand opened this issue Feb 19, 2022 · 4 comments
Open

Logitech triple-click macro on macOS #138

mhillebrand opened this issue Feb 19, 2022 · 4 comments
Labels

Comments

@mhillebrand
Copy link

Greetings. I have a Logitech G703 Lightspeed mouse whose driver has a bug on macOS. That is, it's impossible to create macros such as a double-click or triple-click. I've tried everything, including complaining to Logitech support after every driver update for 16 months and counting. This bug does not exist on Windows. Argh.

Anyway, I thought I might try the Launch Application feature of Logitech's GHUB software by writing a shell script that executes a cliclick command for triple-clicking at the current mouse position:

#!/bin/zsh
cliclick tc:.

image

This shell script does indeed work, but when I tell GHUB to launch this "application," it doesn't do anything.

Have you got any ideas here? Logitech sure doesn't... Their solution is to give me a refund rather than to fix the bug in their software.

Thank you!

image

@BlueM
Copy link
Owner

BlueM commented Feb 20, 2022

The question is if the software – which I hadn’t heard of until reading your issue – is really able to launch an application, i.e. if it works with a “regular” application and only fails with a shell script. If that’s the case, I’d suggest packaging the shell script as an application bundle. You could do that by hand, but the easiest solution would be to use Platypus. (Which is also available via Homebrew, in case you got cliclick from Homebrew.)

@BlueM BlueM added the question label Feb 20, 2022
@mhillebrand
Copy link
Author

mhillebrand commented Feb 20, 2022

Platypus looks like a handy tool. I tested GHUB by launching Stocks.app, and it did work, so I think your theory is correct. However, the app created by Platypus appears to switch the OS context very briefly (even when Run In Background is checked), so there's nothing to be selected (triple clicked). Perhaps I could find a macOS CLI command for switching back to the previously opened window—like Cmd-Tab does—and invoke that within my shell script just before executing cliclick?

Or maybe there's another approach to try... Hmmmm. Anyway, thank you for the advice!

@mhillebrand
Copy link
Author

I just tried the -j and -g options for the open command for launching an application as hidden and/or in the background, but none of these worked:

image

@mhillebrand
Copy link
Author

Just tried simulating Cmd-Tab on the keyboard before cliclick tc:. with AppleScript. I even used osacompile to create an .app, but it doesn't quite work—even outside of Logitech GHUB.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants