3

I'm used to having Command-Left Arrow (+) and Command-Right Arrow (+) to switch between tabs, going to the previous and next tabs. I have configured these keys in System Preferences → Keyboard → Shortcuts for Safari.app.

However, configuring these shortcuts only works sometimes in Safari 10.1 under macOS 10.12. The behavior is this:

  • When pressed in a tab with an active text box, the caret moves to the beginning and end of the row instead
  • When pressed in a tab with history forwards or back, Safari goes forward or back in history instead
  • Only when pressed on a tab that doesn't have the two above conditions, Safari switches to the previous or next tab

How can I disable the two other behaviors or configure the keys correctly so that I can use + and + as previous and next tab shortcuts?

4
  • I don't have a Mac in front of me to test and post a full answer, but it appears to have at some point been possible to edit application and/or system-wide key bindings using System Preferences or a program like KeyBindingsEditor. Commented Apr 6, 2017 at 22:59
  • @chrstphrchvz I didn't find any references to the Home/End and history functionality in System Preferences. I also have Home/End already configured similar to what KeyBindingsEditor does. I think the problem is that Safari is not honoring these (for example, Home/End just goes one page up/down instead, same age Page Up/Page Down) Commented Apr 7, 2017 at 10:06
  • Karabiner is another program I would've suggested, but unfortunately it's being rewritten for Sierra, and I'm not sure if it already can or ever will accommodate the goal here--it might be worth asking them e.g. on Google Groups Commented May 22, 2017 at 15:09
  • I also asked about these secondary/unlisted Safari keyboard shortcuts here: apple.stackexchange.com/questions/338704/…
    – pkamb
    Commented Oct 8, 2018 at 0:45

1 Answer 1

2

You can use Keyboard Maestro to overwrite that ambiguous behavior in Safari and map ⌘←/⌘→ to switch between tabs regardless of any context (text field, history availability), to make it work just like it does in Chrome. It's a pretty straightforward macro like "When ⌘← hotkey is pressed, execute “Previous Safari Tab” action" in a macro folder limited to Safari. However, Keyboard Maestro is not free.

Maybe you could also create a free Applescript service to run Window⟶Show Next Tab command (since this command ignores context, unlike the respective keyboard shortcut) and change system shortcut ⌘←/⌘→ to run that service instead (would like need to add Safari to Accessibility to allow a script manipulating menu items).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .