Open derpmacos opened 5 years ago
Is there a user-visible bug you are seeing?
I will look into that NX_SYSDEFINEDMASK
; can't remember if we have tried to use that in the past.
Previous discussion about the event mask: https://github.com/pkamb/PowerKey/pull/5
PKPowerKeyEventListener.m - (void)monitorPowerKey { ..
bug: NSEventTypeSystemDefined is not a mask. Instead use CGEventMask eventTypeMask = NX_SYSDEFINEDMASK and skip the loop adding masks for other event types.
suggestion: CGEventTapCreate(...) would be better configured with kCGEventTapOptionListenOnly since it doesn't seem to be possible to block the power events.