1819686 Members
3441 Online
109605 Solutions
New Discussion юеВ

VT420 and VT220/VT320

 
Fred Martin_1
Valued Contributor

VT420 and VT220/VT320

Our database application uses most of the function keys on our DEC VT220/VT320 terminals as hotkeys into the application.

Recently purchased a load of VT420 terminals and the function keys are not working in the application.

Set the emulation to be VT100 and the ID to be VT220.

I've poked around in F3 SETUP and nothing I've changed in there regarding function keys has had any effect.

fmartin@applicatorssales.com
7 REPLIES 7
Mark Grant
Honored Contributor

Re: VT420 and VT220/VT320

If the application is written correctly, you shouldn't ned to re-define the keys. The application should be using terminfo to get the specification for each function key. Are you sure that the users who use these terminals have there TERM set to vt420 and that the entry for vt420 is correct.

If you don't use terminfo, then look in /etc/termcap and see if there is an entry for the 420. If not, make one and make the entries for the function keys correct for the terminal. If you don't know what the function keys are sending, you might try opening a file with "vi", pressing all the function keys and saving the file. Then do a "cat -v" on the file to get the characters sent by the terminal.

I can't remember off hand which termcap/terminfo entries relate to the function keys but a quick "man terminfo" should help.

Never preceed any demonstration with anything more predictive than "watch this"
Graham Cameron_1
Honored Contributor

Re: VT420 and VT220/VT320

Fred

You need to either:
1. Make the vt420 behave like a 220/320.
2. Make the app recoginise a vt420.

If 1...
You say you set the emulation to be vt100, it needs to be vt220 or vt320.

If 2...
Does the app support vt420? You say it's a database app. If oracle this is controlled by resource files, maintained by the oracle terminal application.

Best I can do, haven't seen a dumb terminal in years.

-- Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
Fred Martin_1
Valued Contributor

Re: VT420 and VT220/VT320

Ok; my termcap file has no reference to anything VT except VT52.

There are files in /usr/share/lib/terminfo for the VT100, VT220, VT320 - but not VT420.

I thought though, that if the terminal setting was to ID a VT220, and the user's TERM variable was set to VT220, that I wouldn't need to get into this stuff.

The software runs fine on a VT100 and doesn't need any features beyond what that would provide.
fmartin@applicatorssales.com
Mark Grant
Honored Contributor

Re: VT420 and VT220/VT320

That would depend on wether the vt420 keys are actually the same as the vt220. If you set TERM to vt220, the application is supposed to read terminfo and find out what codes will be sent by the terminal when function keys are pressed. If the vt420 key codes are different, it isn't going to work. Now, you could re-program the keys (I don't know how as I don't have a vt420) but that way lies continually having to do this every time someone resets the terminal or accidently manages to restore to factory default. The correct way would be to find out what keycodes are being sent and to create a vt420 terminfo entry for it.

If the application doesn't behave properly, it might keep it's own database of terminal types (I know a lot of applications used to). If that is the case you are either going to have to find it and update it or bite the bullet and re-program the keys.
Never preceed any demonstration with anything more predictive than "watch this"
Rodney Hills
Honored Contributor

Re: VT420 and VT220/VT320

If I'm not sure what a function key is generating. I launch "vi", go into insert mode, press ctrl-v followed by the function key.

You can then see what the function key is generating. Do this for your 2 terminal types.

If I remember right, F1-F4 can generate different codes depending even for the same terminal ID.

HTH

-- Rod Hills
There be dragons...
Fred Martin_1
Valued Contributor

Re: VT420 and VT220/VT320

I have it behaving partially now. I set the mode to be VT400-7 and the term ID to be VT220 (in setup) and the application behaves now except for the function keys F1 through F5, which are actually listed in the setup.

For example F5 can be one of: ignore, fkey, or break

Unfortunately none of these works with my application.

And, the application does in fact have its own termcap file. I've decided to contact them to see if the VT420 is something they need to add.

I'll let you know how they respond.
fmartin@applicatorssales.com
Fred Martin_1
Valued Contributor

Re: VT420 and VT220/VT320

Actually all is well, now. Using mode VT400-7 and term ID VT220 the software does in fact operate properly. That was the only hurdle I needed to cross. As for the rest, I was fooled by that F5 break; I was unaware that on the older VT220 and VT320s, F5 is also break. I thought the software used F5 for a function.

Thanks folks.
fmartin@applicatorssales.com