Jump to content

Keyboard input/Keypress check: Difference between revisions

add nim solution for this task (keyboard input/keypress check)
(Add Plain English)
(add nim solution for this task (keyboard input/keypress check))
Line 972:
{{works with|Mini Micro}}
<lang MiniScript>x = key.available</lang>
 
=={{header|Nim}}==
 
Using https://github.com/johnnovak/illwill
 
<lang nim>import os, illwill
 
illwillInit(fullscreen=false)
 
while true:
var key = getKey()
case key
of Key.None:
echo "not received a key, I can do other stuff here"
of Key.Escape, Key.Q:
break
else:
echo "Key pressed: ", $key
sleep(1000)
</lang>
 
=={{header|Oforth}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.