Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How do I get AnyEvent::Handle to munge arrow keys?

by soonix (Canon)
on Dec 09, 2022 at 21:37 UTC ( [id://11148695]=note: print w/replies, xml ) Need Help??


in reply to How do I get AnyEvent::Handle to munge arrow keys?

Sounds like IO::Stty might be(come) your friend, and/or stty(1).
In both cases, you'd want "raw" vs. "cooked".
  • Comment on Re: How do I get AnyEvent::Handle to munge arrow keys?

Replies are listed 'Best First'.
Re^2: How do I get AnyEvent::Handle to munge arrow keys?
by isync (Hermit) on Dec 10, 2022 at 22:42 UTC
    Any more help? As much as I value your input (and I did already learn a bit more, as to where obstacles might be) - I'd need a little help to understand if what I have in mind is generally doable with AnyEvent::Handle. My current tasks are poking around in what ::Handle internally does and see if I need to get in-between ::Socket and ::Handle for a solution.

    My current idea is that the $filehandle I get from ::Handle isn't the same as the real raw $filehandle connected by ::Socket. Could that be true? Would I need to get access to this lower-level $filehandle? For example, I tried the chars() method from Term::Size::Any on ::Handle's internal $fh - result: undefined. So this doesn't automagically work.
    Also, for example, am I able to catch the signal WINCH (issued on window resize events) from the remote terminal on a connected socket/filehandle if this remote terminal is connected via Telnet?

    Or am I completely on the wrong track?

      Can't help with AnyEvent. The reason why I suggested stty is that Telnet is mostly line oriented.

      I guess that SIGWINCH usually is passed through, but in fact that depends on the Telnet server (and on the client).
        Mh, OK. Thanks soonix!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11148695]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 21:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found