From: Stu Date: 2010-11-26T18:28:03+09:00 Subject: Re: Keypress event in ruby look into a library called ncurses ~ On Fri, Nov 26, 2010 at 2:57 AM, Nikita Kuznetsov wrote: > Hi guys, im working on making a little tetris program in ruby (console > based, no gui). My ruby knowledge isnt great but i would love to get > more familiar with the language, i kinda like the scripting side to it. > > > So my question is, how do you hand keypress events. For example i got a > shape falling down (lets say just a . for the point being). > Lets say i run a for loop to drop the shape, onKeyPressA, move shape > left 1 square. > how would i implement the onKeyPress part, what libraries should i use? > Any help would be appreciated. I havent written much code yet so i'm > figuring posting it here would be kinda useless, all i need is to know > how to create methods for keypress event handling. > > Thanks in advance, > Nikita > > -- > Posted via http://www.ruby-forum.com/. > >