Medical apparatus, including a local medical tool and a remote medical tool, located remotely from the local medical tool. The apparatus includes a lockable joint, physically connected to the local medical tool, that is operable in a locked state or in an unlocked state. A handle is physically connected to the lockable joint, so that in the locked state of the joint, movements of the handle are directly transferred to corresponding movements of the local medical tool. The apparatus includes sensors that are configured, in the unlocked state of the joint, to measure motions of the handle with respect to the lockable joint. The apparatus also includes a controller, which in the unlocked state of the joint receives indications of the motions of the handle with respect to the lockable joint, and which is configured to apply the indications to generate corresponding motions for the remote medical tool.