Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Remapping keys in Terminal

I'm new to the mac.

When I work from home, I need to access my company network and login to Unix boxes there. I use Terminal for this and have it set to emulate a VT100, which is necessary for the text editor that I use. This particular editor makes heavy use of the upper row of keys on the numeric keypad, which sadly don't emulate a VT100.

I noticed a way to remap some of the keys in Preferences, but I'm not sure how to use it or if it will allow me to remap those keys. Can anybody point me to instructions for remapping those keys to the VT100 PF1 - PF4 values?

Thanks from a newbie!

iMac, Mac OS X (10.5.2)

Posted on Apr 3, 2008 10:03 AM

Reply
6 replies

Apr 4, 2008 4:10 AM in response to raulfoonman

Wouldn't it be easier, to just use the Apple_Terminal, terminfo definition on the mac. and also make that definition available on the unix systems that you have to login into?

Just curious which editor?


Nevermind, that idea, I just tried it using vi and function keys. setting the TERM=vt100, and running tset worked. but not using the Apple_Terminal.

Message was edited by: Nils C. Anderson

Apr 4, 2008 4:36 AM in response to Nils C. Anderson

In the Terminal.app preferences, I just did the following. it works for me.

i just assigned a string to the 'control cursor down' and the 'control cursor up' key

export TERM=vt100;tset $TERM

setenv TERM vt100;tset $TERM

Then after logging in to the remote system. just hitting key control cursor up or down key sets the terminal to vt100. and the function keys work in the vi/vim editor.

i use 2 keys, as some of the systems that I login to are using csh and other bash or korn.

Apr 4, 2008 10:46 AM in response to Nils C. Anderson

Thanks for the replies.

Terminal and the Unix boxes I connect to are set to VT100. No problems there. The problem is that Terminal's VT100 emulation doesn't bother with the top row of keys on the numeric keypad. I'm at work now on a PC, so I can't recall the names of the keys. The first one is "Clear", I think.

In Preferences I can remap some of the keys, but not these 4. As an interim solution, I have used Preferences to remap the F16-F19 keys which are right above the numeric keypad, but I'd still like all the numeric keypad keys to emulate a VT100. That means that the top row would behave as what DEC called PF1-PF4.

The editor in question is a third-party editor that emulates DEC's EDT editor. I could use other editors, but that one works particularly well for what I do and I know it from 25 years of working on DEC systems.

So, my main issue is that Preferences in Terminal doesn't seem to include the ability to remap those 4 keys. I'm trying to find a way around that so I don't have to pay real money for a better terminal emulator.

In the meantime, I will look at finding a way to remap the keys in the editor. I can do that, but I'll need to be able to turn it on and off, because when I'm at work I have a Windows PC and use a provided emulator that does a pretty good job.

Thanks again for efforts!

May 1, 2008 10:07 AM in response to Jun T.

I was fighting with this for a while but my buddy, Jeff figured it out for PF1. Instead of trying to map to the key, just use the key. Apparently it works great without any modifications whatsoever from Terminal.app. We access a VMS cluster which requires PF1. Luckily we don't need PF2 or greater...

Remapping keys in Terminal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.