AutoRaise icon indicating copy to clipboard operation
AutoRaise copied to clipboard

Is it possible...

Open samholmes opened this issue 1 year ago • 6 comments

Is it possible to focus only before some events:

  1. when the user has lifted their finger from the trackpad for some amount of time? This way after using the trackpad the focus shifts to where the cursor remains. The delay is to account for finger shifting to new location while continuing cursor movement.

  2. Just before a keyboard key is pressed. This way the key is registered to the new focused window before the key press is sent to the application.

  3. Just before a click event. This way the click registers in the window without a second click required?

This would minimize accidental focus without impacting the perceived performance time of the auto-focus. Right now I have this setup:

delay=0
focusDelay=2
mouseStop=true
warpX=0.5
warpY=0.5

Which means that only when the mouse has stopped in place will the focus trigger. I think the delay 2 is some number of milliseconds that must pass before the focus happens as well. With this setup, there is a slight perceived delay before focus happens, which makes the tool feel less responsive then instantly focusing wherever the cursor is.

In order to improve perceived performance, it would be ideal to trigger focus at the difference event specified above. Are the possible though?

samholmes avatar May 14 '24 22:05 samholmes

@samholmes

Hi there. I took some time to respond because I wanted to give this some extra thought.

In order to improve perceived performance, it would be ideal to trigger focus at the difference event specified above. Are the possible though?

These things may or may not be possible. However I intented AutoRaise to be an as simple as possible add-on to MacOS to make its UI workable. The code is already way more complicated then I ever thought it was going to be. Adding support for trackpad events alone is quite a hassle with gestures and all. Then there is the user experience. AutoRaise started out with just 2 configurable options. By now we have around 15.

All in all, I have to draw a line somewhere between what can be included and what not. For this particular feature, I feel the extra amount of code is probably not worth it. Thanks for reporting though. Your feedback is appreciated and actually is the reason the focus only option was implemented ;-)

sbmpost avatar May 23 '24 09:05 sbmpost

Perhaps it will be worthwhile for me to fork this project and begin making the changes in order to achieve what I'm looking to do. My goal is to make the tool simple as well, so doing away with a lot of configs which don't seem necessary for my purposes which is to make an opinionated version of AutoRaise. Would you be interested in supporting me in this effort on occasion?

samholmes avatar May 23 '24 18:05 samholmes

@samholmes

Would you be interested in supporting me in this effort on occasion?

My time is quite limited these days (full time job, child) so I won't be able to give much support. But yes of course you can fork the project and implement these features. The beauty of open source ;-)

sbmpost avatar May 24 '24 07:05 sbmpost

Hello, I have a question on the same topic ("Is it possible ...")

I see in the initial post a setting is used:

mouseStop=true

Is this setting still available ? I want to achieve the quite opposite behavior - the window to be activated (after the specified delay), even if the mouse is still moving

(If it matters - on last macOs version 26)

ivivanov-bg avatar Sep 23 '25 13:09 ivivanov-bg

@ivivanov-bg

mouseStop has been replaced by focusDelay, see #102 (last comment)

sbmpost avatar Sep 28 '25 06:09 sbmpost

Does this mean there is a bug with the delay then?
It's considered only after the mouse stops moving.
I can move the mouse for like minutes over inactive window and it will remain inactive unless the movement is stopped for some fraction of the second

Edit: I was with the impression that focusDelay is how much to wait before acticate, after the cursor is over a window (no matter if it's still moving or not)

If not - is there any other setting which can adjust such wait ?

ivivanov-bg avatar Sep 28 '25 06:09 ivivanov-bg