From: Alejandro Michelin salomon Date: 2009-03-01T05:33:00+09:00 Subject: Re: Get key pressed Tim Greer wrote: > Alejandro Michelin salomon wrote: > >> Hi >> i need to now how to get a key pressed. >> >> I have a tcpserver, and i want to get if the user press control + x. >> If the users press control + x i make the shutdown. >> >> Can you give my some ligth? > > To be clear, is this a tcpserver running on the local system where you > want to catch the signal (CTRL-X) or do you mean the tcpserver is > running on a remote system and you want to capture the local singal and > send that to the remote service? Tim i need to catch the signal ctrl-x on local machine, to shutdown the server. The problem is this code : client = server.accept The signal ctrl-x does nothing. -- Posted via http://www.ruby-forum.com/.