On 09/09/2017 07:00 AM, Timo Paulssen wrote:
This should be enlightening: https://docs.perl6.org/routine/getc
Hi Timo, From the link: Buffering terminals Using getc to get a single keypress from a terminal will only work properly if you've set the terminal to "unbuffered". Otherwise the terminal will wait for the return key to be struck or the buffer to be filled up before perl6 gets even a single byte of data. This is exactly what I am after. Problem: also from the link: method getc(IO::Handle:D: --> Str:D) multi sub getc (IO::Handle $fh = $*ARGFILES --> Str:D) This is very frustrating to me as it mean ABSOLUTELY NOTHING to me. Without an example, which the link does not provide, I have not the slightest idea what they are talking about. Would you mind jotting down an example of how to read a key press? Many thanks, -T