A switching device comprises a circuit board, a
coil structure, a lower cover, an upper cover, an elastic piece and a sliding piece, the circuit board is provided with a through hole penetrating through the circuit board, the
coil structure is arranged on the circuit board and surrounds the through hole, the lower cover is located above the
coil structure, the upper cover is arranged on the lower cover, the lower cover and the upper cover form a containing space, and the elastic piece is located in the containing space. The sliding part penetrates through the opening of the upper cover and is configured to slide relative to the lower cover along a direction, and the sliding part is configured to drive the elastic part to penetrate through the through hole along the direction so as to generate a
switching signal corresponding to the
inductance value change of the coil structure. Therefore, the application flexibility and possibility of the keyboard keys in the electronic sports field are improved.