Problems with the KEY statement (Documentation Bugs and Problems)
You may want to add the following line to the moveball program to see what key is actually being received.
AFTER k = key
INSERT print k
You will see a number representing the raw keycode you just pressed. If you are not using a US/ASCII keyboard the key codes may be different than the ones I included in the program.
Let me know what you found.