There's a call like this but it's nonstandard. getch() maybe? Sent from my iPhone
On Oct 17, 2011, at 2:54 PM, "Nick Sabalausky" <[email protected]> wrote: > "Jesse Phillips" <[email protected]> wrote in message > news:[email protected]... >> On Thu, 13 Oct 2011 20:49:01 -0400, Nick Sabalausky wrote: >> >>> >>> One thing I'd been thinking of adding to mine was an alternate function >>> that just waited for a single keystroke (rather than a line of text + >>> Enter). I think I once had it working on Tango, IIRC, but then I >>> switched to D2/Phobos and couldn't figure out how to use Phobos to wait >>> for a single keystroke w/o then waiting for Enter. >> >> There isn't a C call to do something like this. In windows you can make a >> call to system("pause"), but that doesn't provide custom text, isn't >> cross platform, and apparently if you close the terminal it will start >> executing code for the time it takes to shut down (i.e. unpause). >> >> Linux you have to pull out an curses trick to manipulate the terminal I >> believe, also not cross platform. It would be nice to get. > > What I meant was to also retreive the key pressed. But it sounds like that > would still have the same problem. > >
