Patent ID: 8305171

Claim:
A rotary switch comprising: an operating member that is operable from outside of a case to move to a first position and a second position in an axial direction and is rotatable, wherein an engaging section having a non-circular cross-sectional shape is formed in a predetermined area of the operating member; a magnet member comprising a ring-shaped magnet and a resin section that covers the ring-shaped magnet, wherein the magnet member as a whole has a substantially circular plate shape, wherein at an inside of the magnet member the resin section has an engaging hole formed therein which has a non-circular cross-sectional shape and into which the engaging section having the non-circular cross-sectional shape of the operating member is inserted, and wherein the magnet member is provided in such a manner that the magnet member does not move in the axial direction of the operating member; and a magnetic sensor that detects rotation of the magnet member, wherein when the operating member is moved in the axial direction, the engaging section of the operating member moves inside the engaging hole of the magnet member with the engaging section of the operating member being engaged with the engaging hole of the magnet member, and wherein when the operating member is rotated, the magnet member rotates with the operating member.