<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7654.2">
<TITLE>Telnet server: Detecting CTRL-&lt;key&gt;, as happends with CTRL-C</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hello,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have an application, with Python 2.4 and Twisted 8.2.0.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Can I somehow detect e.g. CTRL-J key presses in:</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">&nbsp; class Telnet_simulation(telnet.Telnet)</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">--&gt;</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; def dataReceived(self, data):</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">(or elsewhere in code)?</FONT>
</P>
<BR>

<P><FONT SIZE=2 FACE="Arial">When sending CTRL-C, the dataReceived() is called immeaditely, but when sending some other combinations, the data can be seen only after Enter is pressed?</FONT></P>

<P><FONT SIZE=2 FACE="Arial">(telnet_Command is called then) But the CTRL-J is not a telnet command, it should act same way as CTRL-C.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Thank you,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Teuvo</FONT>
</P>

</BODY>
</HTML>