fix: escape key was absorbed by the inactive app (closes #123)

This commit is contained in:
louis.pontoise authored and lwouis committed 2020-01-22 19:51:48 +09:00
1 parent 97798c3443
commit 5260619fe1
1 file changed
+1 -2
+1 -2
View File
@@ -48,8 +48,7 @@ func keyboardHandler(proxy: CGEventTapProxy, type: CGEventType, event_: CGEvent,
let isRightArrow = event.keyCode == kVK_RightArrow
let isLeftArrow = event.keyCode == kVK_LeftArrow
let isEscape = event.keyCode == kVK_Escape
if type == .keyDown && isEscape {
if type == .keyDown && isEscape && application.appIsBeingUsed {
return dispatchWork(application, false, { application.hideUi() })
} else if isMetaDown && type == .keyDown {
if isTab && event.modifierFlags.contains(.shift) {