Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xterm emulation 1

Status
Not open for further replies.

jaymzter

Vendor
Jul 8, 2002
441
US
I'm trying to emulate an att4410 terminal using xterm. I can easily do this using the console by creating my own keymap, but have yet to do this in X. The trouble of course is that I won't have access to a console all the time! The sequences I need to send are shown below (from the modified keymap):

string F1 = "\033OP"
string F2 = "\033OQ"
string F3 = "\033OR"
string F5 = "\033OT"
string F6 = "\033Or"
string F7 = "\033OV"
string F8 = "\033OW"

I tried modifying .Xdefaults using the following:

*att4410.Translations: #override <Key>F1: string(&quot;\033OP&quot;)\n<Key>F2: string(&quot;\033OQ&quot;)\n<Key>F3: string(&quot;\033OR&quot;)\n<Key>F5: string(&quot;\033OT&quot;)\n<Key>F6: string(&quot;\033Or&quot;)\n<Key>F7: string(&quot;\033OV&quot;)\n<key>F8: string(&quot;\033OW&quot;)\n
but that doesn't work. Any help is greatly appreciated.

P.S. - on your system it may be listed as any combination of 4410-w, att4410 or you may only have 4425 or any combo of that, which all use the same keys
Oh, and Merry Xmas
 
You need to change the settings in the termcap file. The entry will be xterm-? depending upon the distro. Look for the f-key entries then modify them as needed. To determine what the f-key is sending now, open an xterm session then vi a test file. Go into insert mode (i) then type ctrl v. This allows a control character. Press an f-key to se what is being sent. If you change the term cap file, you can test the results of the change in the same manner.
 
Thanks a lot! I wound up modifying the file /etc/X11/app-defaults/XTerm with:
*VT100.BctLabel1: : F1 F2 F3 F4 F5 F6 F7
F8 F9 SF1 SF2 SF3
*VT100.BctLabel2: : PrevPg PrvFld NxtFld NxtPg Submit BacTab Cancel
Help NxtFrm Refrsh ClrFld Update
*VT100.Translations: #override ~Shift <Key>F1: string(&quot;\033OP&quot;) \n ~Shift <Key>F2: string(&quot;\033OQ&quot;) \n ~Shift <Key>F3: string(&quot;\033OR&quot;) \n ~Shift <Key>F4: string(&quot;\033OS&quot;) \n ~Shift <Key>F5: string(&quot;\033OT&quot;) \n ~Shift <Key>F6: string(&quot;\033Or&quot;) \n ~Shift <Key>F7: string(&quot;\033OV&quot;) \n ~Shift <Key>F8: string(&quot;\033OW&quot;) \n
and it worked like a champ. I'll just fiddle with it so a user doesn't need to be root for it to work. I've been hunting this down for ever. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top