The New Leopard Terminal

Yesterday I purchased a new Santa Rosa Macbook, and it's been an extremely positive experience so far. The machine is fantastic, and I'm overall pretty impressed with Leopard. Nothing mind-blowing, but it just feels like a more mature OS than Tiger. The pre-release chatter about "lots of little features" is spot on... so far there's no one killer app for me, but plenty of small improvements.

One thing that really stands out for me is the improved Terminal.app. For several years, one of my first installs on a new Mac has been iTerm, a great, free, open-source terminal replacement for OSX. iTerm is very customizable and makes use of a tabbed interface that is a necessity for developers like myself who spend most of the day logged into shells on multiple machines.

With Leopard, Apple has introduced into Terminal the little bits of the functionality that have had me using iTerm for so long. Terminal now supports tabs, and comes with a set of customizable themes -- my old standby of green text on black is now a preset option that I can tweak and save as the default setting.

The only thing I find difficult to adjust to are the keyboard shortcuts to switch between tabs. I am used to using command-left and command-right to change tabs, but by default, the Leopard Terminal uses command-shift-{ and command-shift-}. It's an awkward shortcut, especially for one that I use hundreds of times a day.

My solution was to modify the keyboard shortcut for Terminal.app. This can be done manually, under System Preferences > Keyboard & Mouse > Keyboard Shortcuts, but here's an Applescript that will achieve the same effect:

tell application "Terminal" to quit
do shell script ¬
  "defaults write com.apple.Terminal NSUserKeyEquivalents " & ¬
  "-dict-add 'Select Next Tab' '@\\UF703' " & ¬
  "'Select Previous Tab' '@\\UF702';"
delay 1
tell application "Terminal" to launch

Posted In

Thanks!

This is almost exactly what I was looking for. Instead of Command-Arrow I'd like to use Shift-Arrow (to be consistent with my KDE console). Would you mind suggesting the escape sequence for that?

Thanks again!

Anonymous | Mon, 2008-01-07 14:39

Key mapping

The following characters are used to map keyboard shortcuts... you should be able to piece it together using these:

@ = Command
$ = Shift
~ = Option
^ = Control

This link might be helpful too: Create keyboard shortcuts...

pbull | Tue, 2008-01-15 11:04
Anonymous | Sun, 2008-08-03 12:32

Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Images can be added to this post.

More information about formatting options

Captcha
This question is used to make sure you are a human visitor and to prevent spam submissions.
Copy the characters (respecting upper/lower case) from the image.

Flickr Photos

Get Firefox

Random Quote

You're not to be so blind with patriotism that you can't face reality. Wrong is wrong, no matter who does it or says it.

— Malcolm X