Create mouse code