In 1868, one Mr.Christopher Latham Sholes patented the modern typewriter that we know today. Starting in 1877, the Remington Company began mass marketing the first typewriters for sale to the public. Lots of technological changes had to occur, first, before the humble type typewriter could evolve into the computer keyboard you use today.
One of the earliest breakthroughs that led to the building of the modern-day computer is the teletype machine also known as the teleprinter. That technology has been around since the mid-1800's and was improved upon by a variety of individuals. But it was Charles Krum who made the most significant improvements to the teletype machine from 1907 to 1910. His changes made the system far more practical. In the 1930's models were introduced that combined the input and printing technology of the typewriter with the communications technology of the telegraph. Around the same time, punched card systems were combined with typewriters to create what we know as keypunches. These were the basis for the early adding machine and IBM was selling over one million dollars worth of adding machines in 1931.
You could say that the modern computer keyboard evolved from the punch card and teletype technologies. One of the earliest computers was the 1946 Eniac computer which used the punch card reader as its input and output device. In 1948, along came the Binac computer which "used an electro-mechanically controlled typewriter to both input data directly onto a magnetic tape in order to feed in computer data and to print results." The emergence of the electric typewriter went on to further the marriage between the typewriter and the modern computer.
MIT (Massachusetts Institute of Technology), Bell Laboratories, and General Electric had, by 1964, collaborated to create a computer system called Multics which was a time-sharing, multi-user system. The system encouraged the development of a new user interface called the video display terminal, of VDT. It incorporated the technology of the cathode ray tubes used in television sets into the design of a the electric typewriter. With this, the user could see what they were typing on the display screen for the first time which made it easier to create, edit, and delete. (And thank goodness for that, right?) It also made computers easier to use and to program.
We know that the computer keyboard was based on either the teletype machine or keypunches. The problem with both of those is that there were too many electromechanical steps in transmitting data between the keyboard and the computer which slowed things down. With the VDT technology and the electric keyboards, the new computer keyboards could now send impulses directly to the computer which saved time. By the late 1970's and early 80's all computers used electronic keyboards and VDTs. But it was still Christopher Latham Sholes, the investor of the first typewriter, who came up with the QWERTY keyboard layout which is still largely used on today's modern computers.