Adjust bar orientation through keyboard

Thanks for that! I’ve solve this problem. Putting those detecting in “each frame tab” seems imperfect because it would cause some detection miss, and makes the rotating not smooth enough.

My solution to this, adding an eventlistener at “begin routine tab”, and use addInterval to make it check for keydown frequently, this causes no conflict and makes rotating smooth.

I appreciate you help a lot! Thanks Michael!

one more trivial question I asked in another post, is there anyway to go back to previous routine in online experiment?

What’s the equivalent function in JS I can call to remove a loop? Below is your answer to this question: How to come back to previous routine using code?

This is usually done with loops. Have a loop around both routines. At the end of the second, if you want to repeat the first, do nothing, it will run again automatically. If you don’t want to go back, then set your_loop_name.finished = True