Another variant...
I don't know if it is of any use...
Ghislain
WaitKeyArray ( [key_left, key_right, key_up, key_down] ) ' returns true if one of the keys in the array pressed function KeyHitByArray ( a[] ) for local b = eachin a if keyhit (b) = true then return b next end function function WaitKeyByArray ( a[] ) local i = waitkey() for local b = eachin a if i = b then return b next end function
I don't know if it is of any use...
Ghislain