Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1 @@
getKey→K

View file

@ -0,0 +1,4 @@
!$KEY
.........
GET(K$)
.........

View file

@ -0,0 +1,14 @@
' FB 1.05.0 Win64
Dim k As String
Do
k = Inkey
Loop Until k <> ""
If Len(k) = 1 Then
Print "The key pressed was "; k; " (ascii "; Asc(k); ")"
Else
Print "An extended key was pressed"
End If
Sleep

View file

@ -0,0 +1,7 @@
-- in some movie script
-- event handler
on keyDown
pressedKey = _key.key
put "A key was pressed:" && pressedKey
end

View file

@ -0,0 +1,10 @@
repeat 100 times
-- exit loop if "." or the escapeKey is pressed
if 46 is in the keysDown or 65307 is in the keysdown then
answer "exiting"
exit repeat
else
-- do stuff
wait 200 millisec
end if
end repeat

View file

@ -0,0 +1,4 @@
on keyDown k
-- do stuff, keycode is held in k
if k is not 46 then pass keyDown // will be trapped if "." is pressed, others will be passed on through the message path
end keyDown

View file

@ -0,0 +1,7 @@
import: console
: checkKey
| key |
System.Console receiveTimeout(2000000) ->key // Wait a key pressed for 2 seconds
key ifNotNull: [ System.Out "Key pressed : " << key << cr ]
"Done" println ;

View file

@ -0,0 +1,3 @@
System.Console receive ->key // Wait until a key is pressed ( = receiveTimeout(null) )
System.Console receiveChar ->aChar // Wait until a character is pressed. All other keys are ignored
System.Console receiveTimeout(0) ->key // Check if a key is pressed and return immediatly

View file

@ -0,0 +1 @@
integer key = get_key() -- if key was not pressed get_key() returns -1

View file

@ -0,0 +1,2 @@
if getchar() see "A key was pressed" + nl
else see "No key was pressed" + nl ok