Patent ID: 8570726

Claim:
A foldable keyboard comprising: a main body comprising a key portion comprising a plurality of keys, wherein a receiving chamber is defined in a side of the main body; a cover comprising a plurality of receiving grooves aligned with the plurality of keys, wherein when the cove is rotatably engaged on the main body, the plurality of keys is received in the corresponding receiving grooves; a first hinge portion mounted on a middle position of the main body; and a locking element comprising: a locking portion mounted on the main body, wherein the locking portion comprises a sliding block, a fixing portion, and a first elastic element for elastically connecting the sliding block to the fixing portion, the fixing portion defines a slot in a sidewall thereof, the sliding block comprises a bottom, a stopper protruding from a portion of the bottom, and a first pin mounted on the stopper, the fixing portion further comprises a groove, two sliding tracks protruding from a bottom of the groove, a second pin, and a third pin, the slot is defined in a sidewall of the groove between the two sliding tracks, a first receiving space is defined between the two sliding tracks, a sidewall of the sliding track is recessed to form a second receiving space communicating with the first receiving space, two ends of the bottom of the sliding block are placed in the second receiving spaces, the stopper is placed in the first receiving space, thereby slidably connecting the sliding block to the fixing portion; a limiting portion mounted on the main body, wherein the limiting portion comprises a recessed portion defined in a surface of the main body for receiving the locking portion, the recessed portion defines a limiting slot communicating with the slot in a sidewall thereof, the sliding block is attractable by an external magnetic force to move towards the slot until a portion of the sliding block passes through the slot, and is engaged in the limiting slot, the first elastic element is deformed, thereby engaging the locking portion in the limiting portion; and a controlling portion mounted on the main body, and received in the receiving chamber; wherein the main body is operable to be folded along the first hinge portion, the locking portion is operable to engage in the limiting portion to lock the foldable keyboard in a folding state, and the controlling portion is configured to unlock the foldable keyboard from a folding state.