Add trackball functionality