Desiring bool any_key_pressed()
Andrew Lalis
andrewlalisofficial at gmail.com
Sat Mar 4 07:33:42 UTC 2023
On Friday, 3 March 2023 at 03:38:56 UTC, Daren Scot Wilson wrote:
> Here is a very simple version of the program I'm working on.
> Is there a way to write is_any_key_pressed() that doesn't
> block, doesn't require the Enter key, and doesn't require
> dragging in any complex libraries or dealing with low-level
> stuff like ioctl()? Is there nothing in Phobos that provides
> the needed functionality?
See this SO thread:https://stackoverflow.com/q/1798511
Essentially the os/terminal is buffering your input and that
needs to be configured. getChar just reads from what's in stdin.
More information about the Digitalmars-d-learn
mailing list