Skip to content

Commit

Permalink
fix: don't absorb key up events after summon (closes #2914)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwouis committed Oct 24, 2023
1 parent e75a1ff commit 3b0194d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/logic/events/KeyboardEvents.swift
Expand Up @@ -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)
}
Expand Down

0 comments on commit 3b0194d

Please sign in to comment.