#osxchat blog



作者: Mengjuei Hsieh

As we all know, the terminal emulator program (a.k.a. Terminal.app) in MacOS X 10.3 is a pretty useful tool for unix users. I personally use it everyday, okay, every second. You might already find out that the keymap settings of Terminal.app is a little bit different from those in Xterm or other terminal emulator available under X-window system. For example, the pageup/down keys in Terminal.app means to scroll the screen buffer of Terminal.app window, while the real pageup/down is "shift-pageup/down". Changing the key mappings is the only way to fit Terminal.app into your unix habits.

Actually we already talked about this on the #osxchat channel on IRCNET and we've even recorded it on osx wiki. However, some screenshot pictures are still better in case you are new to MacOS X. So this is the way you change your default keymap of Terminal.app to the way you want in unix world.

First of all, launch your Terminal.app, and start to review the "Window Settings...".

That will give you a "Terminal Inspector" window, you can pull-down the option menu, select "Keyboard".

In the Keyboard page, you can scroll down the Key Mappings and find the Action of current pageup/down. Press "Edit" button to edit the settings.

The actual situation you will find out, you can select the "[6~" and press Cmd-c to copy this string just in case. (Actually it is ^[[6~, but the control sequence ^[ is not displayed.)

Change this shift-page down to the conventional xterm keymap: "scroll to next page in buffer".

Now, you can change the page down key to the real page down in xterm.

Change it to "^[[6~", you can either press Cmd-v to paste the one you just copied or type in by pressing option-ctrl-[ then enter [6~.

Change the page up and shift-pageup, too.

Finally you changed all four key mappings. Also check "Use option key asw meta key", then you can use the meta key you liked in putty....

Pull-down the shell setting page, check "Close only if the shell exited cleanly", this helps you play terminal emulator better.

Before you press "Use Setting as Defaults" button, please play the current setting a while (do not close the Terminal Inspector), if everything okay, save this setting as defaults.

0 篇留言:




? 回前頁