From 28d981cdcac4010136224443f0fdfafcf0809fae Mon Sep 17 00:00:00 2001 From: Robert Eshleman Date: Fri, 17 Oct 2014 14:03:28 -0400 Subject: [PATCH] Remove Cmd-Shift-T Shortcut Because: - Users who wish to remap Cmd-Shift-T to Safari's "Undo Close Tab" menu item (providing equivalent, single-tab-reopen functionality) may do so by simply [assigning a keyboard shortcut] in System Preferences -> Keyboard -> Shortcuts And because: - There are other Safari extensions (like [RecoverTabs]) which provide more comprehensive support for Cmd-Shift-T tab-reopening, including the ability to reopen more than one tab - This extension's remapping of Cmd-Shift-T breaks other in-browser Safari plugins that attempt to use Cmd-Shift-T This commit: - Reverts rs/SafariTabSwitching#15 and removes support for reopening tabs using Cmd-Shift-T. [RecoverTabs]: https://github.com/Antrikshy/RecoverTabs [assigning a keyboard shortcut]: http://support.apple.com/kb/ph13916 --- README.md | 2 -- SafariTabSwitching/SafariTabSwitching.m | 16 ---------------- 2 files changed, 18 deletions(-) diff --git a/README.md b/README.md index a7fb2a0..b251dea 100644 --- a/README.md +++ b/README.md @@ -20,5 +20,3 @@ Usage Use the command + keyboard shortcut to switch between the 9 first tabs of your Safari windows. NOTE: This plugin replaces the default behavior of those hotkeys which is to open the 9 first Bookmark Bar links. - -As a bonus, this plugin also ad Cmd+Shift+T to reopen last closed tab. diff --git a/SafariTabSwitching/SafariTabSwitching.m b/SafariTabSwitching/SafariTabSwitching.m index 018c173..d530301 100644 --- a/SafariTabSwitching/SafariTabSwitching.m +++ b/SafariTabSwitching/SafariTabSwitching.m @@ -52,22 +52,6 @@ - (void)SafariTabeSwitching_sendEvent:(NSEvent *)event return; // prevent event dispatching } } - - } - else if (event.type == NSKeyDown - && (event.modifierFlags & NSDeviceIndependentModifierFlagsMask) == (NSCommandKeyMask|NSShiftKeyMask) && event.keyCode == 0x11) { // keycode of 'T' - - CGEventRef e = CGEventCreateKeyboardEvent(NULL, 0x6, YES); // keycode of 'Z' - - CGEventSetFlags(e, kCGEventFlagMaskCommand); - - NSEvent *new_event = [NSEvent eventWithCGEvent:e]; - - CFRelease(e); - - [self SafariTabeSwitching_sendEvent:new_event]; - - return; } [self SafariTabeSwitching_sendEvent:event];