On Wed, Apr 20, 2011 at 11:21:01AM +1000, Ben Schmidt wrote:
> It should know by $TERM or somehow, though, or be able to find out using
> a callback or something, that the terminal supports or is in 'CSI mode'
> where it will use CSI for Ctrl-M, though, right, and therefore deduce
> that ^M is definitely Enter for that terminal?

I suppose there's a small possibility that might work. It couldn't rely
on $TERM or other static (e.g. terminfo)-based information, but such a
terminal as would send these CSIs could be given a query for it. I'm
reluctant to suggest this though, because in general those things can be
very problematic. Send a sequence to the terminal, even accidentally
(e.g. by 'cat'ing a text file) and it sends a sequence back. In this
case it'd be a strict yes/no it's likely to be better behaved than the
title query, for example (the cause of some amusing security holes).
Still this would require some more thought and discussion before we
could really commit to actually having this information available.


-- 
Paul "LeoNerd" Evans

[email protected]
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui