Java mouse movement follows the original code