A cap moving mechanism for moving a cap for sealing a liquid ejecting head for ejecting liquid to a target, includes a pushing-up part for moving the cap upwards or downwards by rotating, a cam shaft provided integrally with the pushing-up part as a rotating shaft of the pushing-up part, a cam shaft gear including a drive region, which rotates integrally with the cam shaft taken as a rotating shaft, whereby a driving force of a motor for driving the cam shaft is transmitted, and a non-drive region whereby the driving force of the motor is not transmitted and a driving force transmission gear for transmitting the driving force of the motor to the cam shaft gear in order that the cap can be moved downwards from a state in which the cap has been completely moved upwards, after the motor rotates by a predetermined amount from when the cap has been completely moved upwards, and transmitting the driving force of the motor to the cam shaft gear in order that the cap can be moved upwards from a state in which the cap has been completely moved downwards, after the motor rotates by a predetermined amount from when the cap has been completely moved downwards.
An inkjet printer comprising: a body; a first gear assembly mounted to the body so as to cooperate with a motor gear for driving rotation of the first gear assembly, the first gear assembly having a code feature; and a second gear assembly mounted to the body so as to cooperate with the first gear assembly to be rotatable therewith, the second gear assembly, in use, cooperating with a capper for capping a printhead so that the rotation of the second gear assembly moves the capper out of and into its capping position, wherein the code feature of the first gear assembly is arranged to cooperate with a holding feature of a mounting arrangement used to mount the second gear assembly to the body, the code feature being configured so that the cooperation with the holding feature maintains the first gear assembly at a predetermined position during the mounting of the second gear assembly.