godbout / Scrolla.docs

Scroll with Vim motions under macOS
64 stars 0 forks source link

Show AX splash-screen on hotkey if missing access #4

Closed jannis-baum closed 7 months ago

jannis-baum commented 1 year ago

Hitting the Scrolla hotkey with missing AX permissions currently has the same behavior as hitting it when there are no scroll areas (see #3). It would probably help to have the AX splash-screen (that also appears when opening Scrolla without AX permissions) come forward in this scenario.

godbout commented 1 year ago

the hotkey is not set up as long as you don't grant the AX. so i guess what you did is grant, then ungrant. in that case the hotkey handler is not reset yeah. will think what's the best way to handle this. or bringing the Splash forward, or removing the handler. for Wooshy the handler should be removed (handling hotkeys differently).

jannis-baum commented 1 year ago

so i guess what you did is grant, then ungrant

yes! trying to be a software tester over hereπŸ˜‚

godbout commented 1 year ago

πŸ˜…οΈ

yeah. similar with Wooshy. i didn't bother making this super tight. in Wooshy you can still call The Input, type, and highlight, but you can't reach because the event tap is disable. i didn't bother (yet?) coz that's quite a specific case. if someone does this they're looking for troubles πŸ₯ŠοΈ

jannis-baum commented 1 year ago

Alright! Feel free to close if it's not relevant enough!

godbout commented 1 year ago

your idea is good tho. will implement. thanks!

godbout commented 1 year ago

ok now that i'm implementing this, i remember why i didn't implement it in the first place: that would require calling the API to check whether the AX process is trusted EACH TIME you press the hotkey. i don't wanna do that. i think i've read somewhere that it's heavy. that means it may slow down normal usage for just a case where people ungranted (how comes this word doesn't exist) the AX permissions while they're already using the app. also the menu icon will stay etc., so that would be another headache to handle.

what i could do tho, is remove the hotkey handler if the AX permissions are removed. in that case, the hotkey would just stop working altogether, until you grant again.

would that be a better UX than what we have now?

jannis-baum commented 1 year ago

If you can remove the hotkey handler when the AX permissions are removed, can't you just switch the hotkey handler to bring up the splash-screen instead of doing what it usually does?πŸ™ˆ

godbout commented 1 year ago

hmm ok. when i wrote the piece above i kinda felt there was some fault in my logic but was not sure where πŸ€”οΈ but i've had a big fat Indian dinner and i've finished with an ice cream (i never eat sweets) so i guess i'm forgiven?

godbout commented 1 year ago

it's also the way my AppDelegate/AppCore and all the setups are, well, set up, that makes it a bit difficult to see. anyways. a bit overwhelmed now πŸ˜‚οΈ will find a way later. thanks!

godbout commented 7 months ago

done (i think lol)