I'm creating a simple game in ruby and want to detect when different keys are pressed, especially the arrow-keys. I have done this in Java before, but can't seem to find how this is done in ruby.
Does anyone know whether or not ruby has a similar kind of KeyEvent and getKeyCode() as in Java?
From the comments, this approach seems to have worked for OP. https://gist.github.com/acook/4190379