Post

Replies

Boosts

Views

Activity

How do I do a low level trackpad click?
I've set up a hot key to move the mouse pointer to my second machine without having to use the trackpad (it's a long way when you have to move across two monitors). I managed this with a hack using some basic python scripts and an accessibility feature (pointer control with keyboard). This is great and being able to ket the mouse pointer over to the other computer quickly is a big time save already. However, there is one nagging problem I'm trying to solve. Though my hack transfers trackpad input over to computer #2, keyboard input continues to go to the first computer until I manually click the trackpad, at which point computer #2 gains focus and starts to receive keyboard input. So I want to try to automate this trackpad click. My python script, which uses the Quartz library, was not enough. Keyboard input still goes to first computer after a simulated click on the second computer. I'm hoping there is some private api to help me pull this off but I'm far out of depth as far as the innards of macos development goes. Can someone point me in the right direction?
1
0
329
Mar ’24