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

EjectMenu: use of modifier keys is undocumented and broken if menu not open #279

Open
von opened this issue Sep 11, 2022 · 1 comment
Open

Comments

@von
Copy link
Contributor

von commented Sep 11, 2022

EjectMenu's handling of modifiers keys is undocumented and distracting if the menu isn't open:

  1. If a menu item is selected while a modifier key is pressed, then instead of ejecting the volume, the volume is opened in the Finder (see execMenuItem(). This behavior is undocumented as far as I can tell.
  2. The menu icon responds to Command being pressed by changing its icon (see changeEjectMenuIcon()). However this happens even if the menu is not already open, which is distracting (especially since clicking on menu items with the Command key pressed does nothing).
@von
Copy link
Contributor Author

von commented Sep 11, 2022

Exploring the hs.menubar documentation I'm not finding any apparent way to only change the menubar icon when a modifier key is pressed if menu is being displayed. I could see starting a watcher when the menu is created and stopping that watcher when a menu item is selected, but I don't see any way of stopping the watcher if the menu is closed without an item being selected.

So I suspect that explains why the Spoon behaviors as it does with regarding to changing the icon all the time.

von added a commit to von/Spoons that referenced this issue Sep 11, 2022
cmsj pushed a commit that referenced this issue Nov 2, 2022
eraserhd pushed a commit to eraserhd/Spoons that referenced this issue Jul 11, 2024
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