1819803 Members
3106 Online
109607 Solutions
New Discussion юеВ

tera term and TAB

 
SOLVED
Go to solution
andi_1
Frequent Advisor

tera term and TAB

Hi guys,

I need to use TeraTerm Terminal emulator, and for some reasons, TAB key wouldn't work. Here is what I get when I press TAB:
dhcp4468107:/> ^[[

When, I am VIing the file, TAB also wouldn't work.

Here my stty settings:
speed 9600 baud; line = 0;
rows = 25; columns = 82
min = 1; time = 0;
intr = ^C; quit = ^\; erase = DEL; kill = ^U
eof = ^D; eol = ^@; eol2 ; swtch
stop = ^S; start = ^Q; susp ; dsusp
werase ; lnext
parenb -parodd cs7 -cstopb hupcl -cread -clocal -loblk -crts
-ignbrk brkint ignpar -parmrk -inpck istrip -inlcr -igncr icrnl -iuclc
ixon -ixany ixoff -imaxbel -rtsxoff -ctsxon -ienqak
isig icanon -iexten -xcase echo echoe echok -echonl -noflsh
-echoctl -echoprt -echoke -flusho -pendin
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel -tostop


Does anyone know how to make TAB to work?

I also tried,
stty tabs tabs, didn't work.

Thanks a lot!
5 REPLIES 5
Bill Hassell
Honored Contributor
Solution

Re: tera term and TAB

Check on what $TERM was guessed at. (hint: ttytype -s). $TERM is used as the interface between the (hundreds of) terminals and emulators. stty doesn't perform much in the way of translation. You may have to create a teraterm entry in the terminfo database by using untic and tic. Reead the man page for terminfo, specifically the section about tabs (Tabs and Initialization).

It appears that however you have configured teraterm, it is no sending out the tab character, which is a very nonstandard configuration. Use xd to decode what the emulator sends (assuming you cannot fix the emulation problem). To decode what is being sent, type xd, then Enter, now type aTABa and then Enter, then CTRL-D. (TAB is the tab key, not the string: TAB) A 'normal' terminal will show: 6109 610a where 61 is the letter a and 09 is the TAB character.



Bill Hassell, sysadmin
andi_1
Frequent Advisor

Re: tera term and TAB

Hi Bill,

Thank you for the info.

Here is what I get:

dhcp4468107:/> ttytype -s
TERM='vt100'; export TERM;
LINES=25; export LINES;
COLUMNS=82; export COLUMNS;
ERASE='^?'; export ERASE;

dhcp4468107:/> xd
0000000 1b5b 327e 1b5b 327e 1b5b 327e

Configuration seems to be correct, right?

Thanks again!
Bill Hassell
Honored Contributor

Re: tera term and TAB

Well, the ERASE character is definitely strange (ERASE='^?'; export ERASE) and the xd string decodes to:

dhcp4468107:/> xd
0000000 1b5b 327e 1b5b 327e 1b5b 327e

ESC [ 2 ~ ESC [ 2 ~ ESC [ 2 ~

which was transmitted by your emulator to HP-UX. So Teraterm is sending a very non-standard sequence, certainly not a VT100 emulator at all. To verify, run the plain old Hyperterm program. If that works OK, time to call Teraterm to how to fix it.


Bill Hassell, sysadmin
Mark Seaman
Advisor

Re: tera term and TAB

I use TeraTerm to login to my HP servers from home. The tab key works correctly for me.

1. Run the 'keycode.exe' program supplied by TeraTerm to see what keycode the tab key is generating. The TAB key generates a keycode of 15 on my system. Check for that keycode in the keyboard.cnf file.

2. Try a differnet terminal type from TeraTerm. From the menu, pick Setup..Terminal and chance the terminal ID to a different one. Make sure your profile is not explictly setting the TERM variable. If it is, change the terminal ID to the one you just set.

Good luck.
Bill Hassell
Honored Contributor

Re: tera term and TAB

Good advice about setting the terminal type. There is a little-known feature in telnet that passes a value for TERM as well as columns and rows. This feature is part of the client telnet negotiation, so if your local computer sets $TERM to a strange value, the default for HP-UX is to use what the telnet daemon received.

My preference is to take out the code in /etc/profile (and /etc/csh.login) which bypasses ttytype if TERM is already set. The only way it can get set at login is through the telnet negotiation. By allowing ttytype to always test the terminal, you'll avoind a lot of problems. Note also that the console on all the new machines (N,L,A and the newer rpXXXX machines bypasses normal ttytype processing. See:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xa07087dc4d7dd5118ff00090279cd0f9,00.html


Bill Hassell, sysadmin