vote up 1 vote down star
2

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:

.../unable-to-switch-a-tab-efficiently-in-macs-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?

Not really a programming question, but I think the answer would be useful to other folks that program on Macs and would like to have some consistency between interfaces of different applications. Thanks!

* Couldn't add the hyperlink as a new user

flag

migrated from stackoverflow.com

3 Answers

vote up 2 vote down

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 "Select Next Tab"
  7. For the Keyboard Shortcut type ctrl-tab
  8. Click Add. You are g2g!
link|flag
I'd also add ⌃⇧⇥ for the previous tab. – jtbandes Oct 24 at 20:37
vote up 1 vote down

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.

link|flag
vote up 0 vote down
  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.

link|flag

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.