[Twisted-Python] stdio.StandardIO and control keys

mayamatakeshi mayamatakeshi at gmail.com
Sun Jul 13 21:02:37 MDT 2008


Hello,
I've just started learning twisted.
I'm trying to build an utility to connect to a tcp port (telnet-like) and
exchange messages with an application.
I'm using twisted.internet.stdio.StandardIO passing a Protocol to its
constructor (I'm tinkering with the dataforward.py example from the twisted
book).
I'm adding preprocessing to this utility so that I can check what the user
has input before sending it to the peer. So far it is working fine, as I
just have to override the method Protocol.dataReceived. But I'm trying to
add history of previously input strings and for this, I need to check if the
user is pressing control keys (basically 'up' and 'down' keys, but alt,
shift and friends would be nice too).
I'm not sure if this is a twisted related issue, but is it possible to
somehow capture these key presses ? (they are not notified to dataReceived)
Regards,
takeshi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20080714/c9e2f18f/attachment.html>


More information about the Twisted-Python mailing list