From 4d7eeeb383d545988fbf21b42f86686da94aea9f Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Thu, 25 Feb 2021 21:21:36 +0100 Subject: [PATCH] =?UTF-8?q?Ensure=20=E2=8C=98Z=20/=20=E2=87=A7=E2=8C=98Z?= =?UTF-8?q?=20are=20not=20sent=20to=20file=20browser=20when=20it=20does=20?= =?UTF-8?q?not=20have=20focus?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since the context menu is outside the normal view/responder hierarchy, it can receive key events even when file browser is not the active view. --- Frameworks/FileBrowser/src/FileBrowserViewController.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Frameworks/FileBrowser/src/FileBrowserViewController.mm b/Frameworks/FileBrowser/src/FileBrowserViewController.mm index 3f3021e8..3369bde8 100644 --- a/Frameworks/FileBrowser/src/FileBrowserViewController.mm +++ b/Frameworks/FileBrowser/src/FileBrowserViewController.mm @@ -488,8 +488,8 @@ static NSMutableIndexSet* MutableLongestCommonSubsequence (NSArray* lhs, NSArray { /* -------- */ }, { @"Finder Tag", .tag = kRequiresSelectionTag, .ref = &finderTagsMenuItem }, { /* -------- */ }, - { @"Undo", @selector(undo:), @"z" }, - { @"Redo", @selector(redo:), @"z", NSEventModifierFlagCommand|NSEventModifierFlagShift }, + { @"Undo", @selector(undo:) }, + { @"Redo", @selector(redo:) }, { /* -------- */ }, }; @@ -502,6 +502,8 @@ static NSMutableIndexSet* MutableLongestCommonSubsequence (NSArray* lhs, NSArray { @selector(toggleQuickLookPreview:), " " }, { @selector(copy:), "@c" }, { @selector(copyAsPathname:), "~@c" }, + { @selector(undo:), "@z" }, + { @selector(redo:), "@Z" }, }; for(NSMenuItem* menuItem in menu.itemArray)