From: Nikita Kuznetsov Date: 2010-11-26T17:57:20+09:00 Subject: Keypress event in ruby 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/.