Patent ID: 8634196

Claim:
A locking mechanism, configured in an electronic device, the electronic device comprising a first body, a second body and a moving module, wherein the moving module is disposed between the first body and the second body, so that the second body is slidable and tiltable relative to the first body, the moving module includes a rotating module, a first plate, and a second plate having a positioning hole, the rotating module is configured on the first body, the first plate is connected to the rotating module, the second plate is fixed to the second body, and the first plate is slidingly coupled to the second plate with opposite edges where the positioning hole is disposed therebetween, the locking mechanism comprising: a first connecting member, disposed on the first body; and a plug, movably disposed on the first plate, wherein when the plug is coupled with the first connecting member by a magnetic force, the second body is slidable relative to the first body, and when the second body is tilted up relative to the first body, the first plate and the second plate are tilted up and away from the first body with the second body, such that a first end of the plug is decoupled from the first connecting member, a second end of the plug enters and interferes the positioning hole, and the first plate and the second plate are constrained by the plug to avoid sliding relative to each other, wherein when the second body is not tilted up relative to the first body, the first end of the plug is coupled with the first connecting member by a magnetic force, the second end of the plug is not interfered with the positioning hole, such that the first plate and the second plate are not constrained by the plug and slide relative to each other.