88

How can I make Ctrl-Tab and Ctrl-Shift-Tab switch between tabs in Terminal.app on a Mac (OS 10.4 and 10.5 specifically)? This is how I switch tabs in Firefox and Aquamacs, and Command-Shift-[ and Command-Shift-] is too awkward to me. I am aware of this related question:

How can I change the keyboard shortcut for switching tabs in Mac Terminal?

And hence the Keyboard Shortcuts section of the System Preferences, but the dialog box for Keyboard Shortcuts doesn't seem to accept Ctrl-Tab in the Keyboard Shortcut field. Is there a special keyboard sequence for inputting tabs (with modifiers) into a dialog box field on a Mac? Is there any other method that would allow me to customize Terminal.app in the way I desire?

1
  • 12
    Just for reference: Shift-Command-Left/Right Arrow also switch tabs. And in Mac OS X Lion 10.7, you can use a three-finger swipe to switch tabs
    – Chris Page
    Sep 17, 2011 at 10:15

7 Answers 7

128

I just tried this under Snow Leopard and it worked beautifully:

  1. Open System Preferences => Keyboard
  2. Go to Keyboard Shortcuts
  3. Click on "Application Shortcuts" on the left
  4. Click the little "+" to add a program
  5. Navigate to Terminal (it's hidden in Applications/Utilities)
  6. For the Menu Title type "Show Next Tab" or "Show Previous Tab" ("Select Next Tab" and "Select Previous Tab" for Mavericks or older) (Also, these items will be different for languages other than English.)
  7. For the Keyboard Shortcut type Ctrl-Tab or Ctrl-Shift-Tab
  8. Click Add. You are g2g!
10
  • You++, Works on mountain lion too. Feb 26, 2014 at 18:09
  • Cool, same to mavericks.
    – Vlad T.
    Jun 13, 2014 at 17:56
  • 23
    It's "Show Next Tab" and "Show Previous Tab" under Yosemite. But it's slower than using Command+Shift+Right or Command+Shift+Left for some reason (which, btw, makes me envy Linux users).
    – LoremIpsum
    Oct 19, 2014 at 17:31
  • Not working for Yosemite :(
    – Siddharth
    Nov 5, 2014 at 8:27
  • 1
    In OSX El Capitan I don't see a way to navigate to Terminal inside the utilities folder to add it to the application shortcuts list. I wound up just moving the app into /Applications, which worked. Nov 5, 2015 at 4:37
20
  1. Select next (right) tab CMD + }

  2. Select previous (left) tab CMD + {

So you would need to do CMD + Shift + [ or ] for left and right respectively.

1
  • 1
    Why did Apple decide to assign such horrid shortcuts to such frequently needed commands?
    – Niks
    May 24, 2016 at 10:03
7

Yet an addition to the answer above: The manual binding of shortcuts has changed in Yosemite from "Select Next Tab" & "Select Previous Tab" to "Show Next Tab" & "Show Previous Tab"

4

shift + command + arrow left/right works out of the box on Yosemite.

1

Okay so here is the only way I could figure out how to do it. First create the command you want to use system preferences but use a placeholder instead of tab since it wont let you insert the tab. Then open up com.apple.terminal.plist (most easily done with the plist editor) and go to the section NSUserKeyEquivalents and you should see the commands you created. Delete the placeholder and go to the edit menu and select special characters. The tab character is in the arrows section. It's an arrow pointing towards a vertical line. Its unicode value is 21E5. Once that is inserted save and quit and it should work! You could also do all of this in system preferences but you have to insert all the characters instead of typing them and I have no idea what their unicode values are.

By the way, I assume apple has at least a semi good reason for not allowing tab characters normally, so proceed with caution. A lot of global shortcuts use tab but ctrl-tab doesn't seem to be one of them so you're probably okay.

0

Use iTerm2. It is a terminal alternative that supports this keyboard shortcut out of the box.

0

For yosemite: http://taiki.net/2014/11/osx-terminal-sck.html

As I do not have any reputation to just comment I had to copy the answer.

  1. Open System Preferences => Keyboard
  2. Go to Keyboard Shortcuts
  3. Click on "Application Shortcuts" on the left
  4. Click the little "+" to add a program
  5. Navigate to Terminal (it's hidden in Applications/Utilities)
  6. For the Menu Title type "Show Next Tab" or "Show Previous Tab" (these items will be different for languages other than English)
  7. For the Keyboard Shortcut type Ctrl-Tab or Ctrl-Shift-Tab

The difference with yosemite is... they changed from "Select X Tab" to "Show X Tab"...

Why?

You must log in to answer this question.