300 BCE – The first keyboard, a kind of pipe organ, is invented in Ancient Greece.

1300s – The clavichord is invented. While popular for several centuries, it is too soft to use in larger venues. Listen to the first few seconds of Scott Joplin’s The Entertainer on the clavichord:

Around the same time, the harpsichord is invented. It also becomes popular (and is still used for recording classical keyboard music composed before the piano was invented). Unfortunately, it doesn’t allow the player to control volume through touch. Listen to The Entertainer on the harpsichord:

Early 1700s – The piano (an abbreviation of pianoforte, literally “soft-loud”) is invented in Italy by Bartolomeo Cristofori. It’s a revolution in keyboard history, one-upping the instruments that preceded it. Unlike the clavichord, the piano can be played loudly. Unlike the harpsichord, it allows control of volume through touch. Here’s The Entertainer on the piano:

1800s – Until this time, on most keyboard instruments the large keys were black and small keys white:

But this made it hard to visually distinguish the large keys, which adjoin each other. Well, it took a few centuries, but a solution was found – reverse the colors!

Late 1800s – After nearly 200 years of experimentation by thousands of designers and manufacturers, the evolution of the piano into its modern form is complete.

1929 – The first electric piano is invented. Listen to The Entertainer on the electric piano:

1935 – The popular and influential Hammond organ is introduced:

1964 – The synthesizer appears, allowing the creation of novel timbres (sounds). Here’s just one of the infinite sounds possible:
1980s – The digital piano is introduced. Unlike synthesizers, digital pianos offer high-quality acoustic piano sounds and simulate the action (feel) of acoustic pianos. Maybe you have one!
1983 – MIDI (Musical Instrument Digital Interface) is invented, allowing electronic keyboards to communicate with computers and other keyboards.

1990s to present – The internet enables virtual piano lessons, musical collaborations spanning multiple locations, and much more.