Modern keyboards are based on the system devised for the very first typewriter, patented in 1873 by the Milwaukee printer Christopher Latham Sholes. His model used a piano-style keyboard of two rows of keys arranged alphabetically. This ran into problems when the metal typebars linked to the keys jammed if pressed too quickly. The solution was to separate commonly used letter pairs like ‘th’ so the typebars jammed less often.
This system was called QWERTY, after the first letters of the top row. Contrary to popular myth, it wasn’t intended to deliberately slow down typists, but rather help them work more efficiently. After Remington picked up the manufacturing rights to Sholes’ typewriter, the QWERTY system was continually modified, shifting the position of less important keys and adding new ones.
The whole QWERTY system took on a new life with the advent of electronic typewriters before IBM adopted it in the Sixties for its first PC keyboards. Since then, there have been many improvements, such as the addition of function keys.
Answered by Mike Andereisz