fix: don't absorb key up events after summon (closes #2914)
This commit is contained in:
1 parent
e75a1ff4fe
commit
3b0194d886
1 file changed
+1
-3
@@ -146,9 +146,7 @@ fileprivate func handleEvent(_ id: EventHotKeyID?, _ shortcutState: ShortcutStat
|
||||
fileprivate func cgEventFlagsChangedHandler(proxy: CGEventTapProxy, type: CGEventType, cgEvent: CGEvent, userInfo: UnsafeMutableRawPointer?) -> Unmanaged<CGEvent>? {
|
||||
if type == .flagsChanged {
|
||||
let modifiers = cocoaToCarbonFlags(NSEvent.ModifierFlags(rawValue: UInt(cgEvent.flags.rawValue)))
|
||||
if handleEvent(nil, nil, nil, modifiers, false) {
|
||||
return nil // focused app won't receive the event
|
||||
}
|
||||
handleEvent(nil, nil, nil, modifiers, false)
|
||||
} else if (type == .tapDisabledByUserInput || type == .tapDisabledByTimeout) {
|
||||
CGEvent.tapEnable(tap: eventTap!, enable: true)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user