Add mouse tracking to API