Original Post
The Internet is saturated with wishy-washy non-answers to this question. Why is it such a convoluted problem?
Is there a way to read stdin in a non-blocking fashion?
I'd prefer a cross-platform solution, but I'm willing to hear out platform-specific solutions as well. I suppose another way to phrase the question would be like this: can I read raw keyboard input? Can I just check some kind of memory map indicating what keys are currently being pressed?
I use SDL for my graphical projects, and it provides a way to capture key events in a non-blocking manner. I'm working on a terminal app right now, and I'd rather not bring in SDL strictly for input event handlers. There has to be a simpler way...
Is there a way to read stdin in a non-blocking fashion?
I'd prefer a cross-platform solution, but I'm willing to hear out platform-specific solutions as well. I suppose another way to phrase the question would be like this: can I read raw keyboard input? Can I just check some kind of memory map indicating what keys are currently being pressed?
I use SDL for my graphical projects, and it provides a way to capture key events in a non-blocking manner. I'm working on a terminal app right now, and I'd rather not bring in SDL strictly for input event handlers. There has to be a simpler way...