A detachable keyboard structure includes a first magnetic component, a second
magnetic
component, and a movable component. The first magnetic component is disposed in
the wireless keyboard while the second magnetic component is disposed in the computer
main body. The first and the second magnetic components produce magnetization due
to the opposite magnetisms thereof for attracting the keyboard to the computer
main body. The moveable component is capable of transferring the magnetic relation
between the first magnetic component and the second magnetic component. When the
moveable component is forced to move and therefore transfer the magnetic relation,
the first and the second magnetic components produce repellence with each other
due to the same magnetism thereof for detaching the keyboard from the computer
main body.