A keyboard is a peripheral device that enables the user to input text on a computer or any other electronic device. The keyboard is an input device and the most basic way to communicate with the user's computer. The device is patterned after its predecessor , the typewriter , from which the keyboard inherited its layout , although the keys or characters are arranged to act as electronic switches. Keys include punctuation , alphanumeric and special keys such as Windows keys and various multimedia keys that incorporate their specific functions.