Ruby Win32Api get single character non-blocking
Posted
by Markus Orreilly
on Stack Overflow
See other posts from Stack Overflow
or by Markus Orreilly
Published on 2010-04-22T00:42:38Z
Indexed on
2010/04/22
9:03 UTC
Read the original article
Hit count: 151
I'm trying to write a simple game working with two threads, one thread to get input from the user, and another thread to animate some scenes. I'm able to get characters without pressing ENTER just fine, but it blocks in the animating thread until the user presses a key. Does anyone know of a way to get a character from the keyboard non-blocking?
© Stack Overflow or respective owner