From: Tom Cloyd Date: 2009-02-28T13:40:06+09:00 Subject: Re: Get key pressed 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? > I have an interest in this myself, and hope soon to be acting on it. Meanwhile, MY prime resource is this: On page 776 of the (see "Resources" below) takes up "Getting Input One Character at a Time". It discusses the Curses extension that is a part of Ruby, and the Highline library (a gem). It's only a couple of pages, but its the most focused discussion I've seen yet. I assume that I'll learn more from the RDoc material associated with the Highline gem, and probably in various blogs out there somewhere, etc. All I know... hope it helps. t. Resources: * O'Reilly publisher sales page: http://oreilly.com/catalog/9780596523695/ - Prices here seem high. I know I didn't pay $40 for my PDF version. Amazon may have used copies for cheaper. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist Bellingham, Washington, U.S.A: (360) 920-1226 << tc@tomcloyd.com >> (email) << TomCloyd.com >> (website) << sleightmind.wordpress.com >> (mental health weblog) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~