When was the keyboard invented?

The first practical, modern typewriter was patented in 1868.