I had Net::Telnet execute a SHOW TERMINAL command and it came up with VT320 without my having done a SET TERMINAL but I decided to try it out anyway. It seems to be working now but I tried commenting out the SET TERMINAL command and it still works. =(

Right now I'm sending "\e[18~" for F7. I swear I tried that last night and it didn't work. *sigh* Guess I should've used the dead chicken last night. =)

The way I found what code to use (\e[18~ isn't documented anywhere on the 'net that I could find) deserves some mention... What I did was, using a telnet client that I knew worked in those menus, I logged into the VMS server and, from there, telneted into our development box running linux. The login prompt echo's back any control keys (including ^H, which is a pain) using ^[ to represent ESC. So I just started hitting function keys and recording what it echoed back. =)

This is what I got back for all the function keys:

F-Key String to Send ------------------------- F1 ^[OP F2 ^[OQ F3 ^[OR F4 ^[OS F5 ^[[16~ F6 ^[[17~ F7 ^[[18~ F8 ^[[19~ F9 ^[[20~ F10 ^[[21~ F11 ^[[23~ F12 ^[[24~

Anyway, it now seems to be working. Thanks much for all your help! I never even thought to try the SET TERMINAL command. :-)

bbfu
Seasons don't fear The Reaper.
Nor do the wind, the sun, and the rain.
We can be like they are.


In reply to (bbfu) (set terminal) Re(4): Function keys via Net::Telnet by bbfu
in thread Function keys via Net::Telnet by bbfu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.