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

is there any (easy hehe) way to prevent the KeyboardShortcut to respond when the user is on the status item(s) of the app #149

Open
godbout opened this issue Oct 3, 2023 · 3 comments

Comments

@godbout
Copy link

godbout commented Oct 3, 2023

just curious. i'm having issues with apps that use AX, when i'm calling the AX on itself (at least on the status item). so i'm trying to find an easy way to prevent the KeyboardShortcut to record a press when the mouse is on the status item (or its menu). i can use even more AX to grab the AXUIElement under the mouse location, then check the subrole and title, but wondering if there's somehow a way on KS itself? does that make sense? thanks.

@godbout
Copy link
Author

godbout commented Oct 3, 2023

oh btw, this seems to be the consensus around LSUIElement apps? all the ones i have and that respond to a hotkey, do not when you're on the status items/menus. not sure if that behavior is related to those issues i'm encountering. but i've just noticed.

@godbout
Copy link
Author

godbout commented Oct 4, 2023

oh, only seeing this now: #1

seems like what i need :D

@godbout
Copy link
Author

godbout commented Oct 4, 2023

ok so i've been "studying" the code and i see. i've been checking other apps and for some of them their KS doesn't work when ANY menu is open. some of them it's only when their OWN menu is open. i'm trying to achieve the latter. but also my reason may not be that great. the reason i'm trying to do this is, as explained in the first post i think, i've always had troubles with using the AX on the menu items on my own apps. not sure why but it always ends up crashing.

anyways. thinking out loud. if what i'm saying doesn't make sense here, we can close this issue. thanks.

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

No branches or pull requests

1 participant