Patent attributes
A portable electronic apparatus includes a first body, a second body pivotally connected to the first body, and a first keyboard detachably disposed on the first body. The first keyboard includes a casing, a plurality of keys disposed on the casing, a first base movably disposed in the casing, a knob disposed on the first base, a magnet fixed to the first base, a second base fixed into the casing and located above the first base, and an electromagnet fixed to the second base as corresponding to the magnet. A top surface of the knob is exposed from and higher than a top surface of the casing. The powered electromagnet generates a magnetic attraction force to the magnet to drive the first base to move towards the second base and increase a height difference between the top surface of the knob and the top surface of the casing.