Keyboard input/Keypress check: Difference between revisions

→‎{{header|Perl 6}}: Add a Perl 6 example
(→‎{{header|Perl 6}}: Add a Perl 6 example)
Line 542:
 
This code prints <code>"doing something"</code> 10 times and then ends. Parallelly another process prints every key you type in.
 
=={{header|Perl 6}}==
{{works with|Rakudo|2018.10}}
 
<lang perl6>use Term::ReadKey;
 
react {
whenever key-pressed(:!echo) {
given .fc {
when 'q' { done }
default { .uniname.say }
}
}
}</lang>
 
=={{header|Phix}}==
10,333

edits