Switches actuated by change of magnetic field or of electric field, e.g. by change of relative position of magnet and switch, by shielding