On Friday, 22 November 2019 at 04:22:07 UTC, FireController#1847 wrote:

Right, but readln will only wait until the user presses the delimiter (by default Enter/Return). I want it to wait until ANY key is pressed, not a specific key

The documentation for std.stdio.File shows two functions for reading input: readln and readf. If readln isn't what you want, then readf probably is:

https://dlang.org/phobos/std_stdio.html#.File.readf

Also, there's a freely available book online to help get you up to speed: Programming in D. Here's the section on reading from stdin with readf:

http://ddili.org/ders/d.en/input.html

Reply via email to