MenuHammer icon indicating copy to clipboard operation
MenuHammer copied to clipboard

keypress will feed to the focused application after the menu popup

Open wd opened this issue 2 years ago • 8 comments

This is not always happening. I'm still trying to find the pattern.

When this happens, all the keypress will be fed to the focused application. The menu will still be there. It only responded to the quit command.

To fix this, I just need to lock the screen and unlock it again. After that, all the functions work again.

I'm not sure why this is happening. But this is really annoying.

hammersoon: Version 0.9.97 (6267) macos: 12.6 (21G115)

wd avatar Dec 27 '22 02:12 wd

Sorry for the delayed response but I think I just replicated this. I'll see if I can track it down.

FryJay avatar May 08 '23 05:05 FryJay

Actually I guess I didn't replicate it, was another issue I ran into that was being caused by my own config having the wrong menu configured as the parent menu.

FryJay avatar May 08 '23 05:05 FryJay

I haven't seen this since I changed to M1 with MacOS 13.3.1 (a) (22E772610a). I don't know whether it is related.

wd avatar May 08 '23 06:05 wd

This started happening to me yesterday. It occurs only when I activate MenuHammer while working in iTerm2. For all other apps everything is as usual.

Hammerspoon 0.9.100 (6815) macOs: 12.0.1 (x86 hackintosh)

vasac avatar Sep 29 '23 23:09 vasac

In the case of iTerm2, the culprit was the 'Secure Keyboard Entry' option, which was enabled (⌥⌘S).

vasac avatar Sep 30 '23 00:09 vasac

This behaviour is kind of odd. I think it has to do with OS X going into a weird state. I can confirm that this is related not only to hammerspoon/menuHammer, but to some state in OS X.

Today, it behaved like this: menu pops up, but keys are not handled by MenuHammer (they are passed through).

Restarted Hammerspoon, same.

Rollback to previous working configuration of Hammerspoon, same behaviour.

So there is something in OSX that creates this problem. I do run iTerm2, but could not find the "Secure Keyboard Entry " option. @vasac , would you mind telling me where to find it?

I'll keep experimenting to see what is going on.

(addendum): Indeed, locking screen and unlocking fixes it.

dmgerman avatar Oct 16 '23 17:10 dmgerman

It's one of the options in the 'iTerm2' menu, the fourth one from the bottom. https://iterm2.com/documentation-menu-items.html

iTerm2 > Secure Keyboard Entry

When this is enabled, the operating system will prevent other programs running on your computer from being able to see what you are typing. If you're concerned that untrusted programs might try to steal your passwords, you can turn this on, but it may disable global hotkeys in other programs.

vasac avatar Oct 17 '23 01:10 vasac