Keyboard Entry and Displaying Text
Entering information to a program from a keyboard is a common task. The data entered is one form of text. In X Window, each key on a keyboard is considered to be like a mouse button in that they raise events. Like a mouse button, each keyboard key can raise two different types of events: a key press event and a key release event (although on some PC keyboards, the key release event may not be implemented). Since each key is identified uniquely, different patterns for presentation of the meaning of a key and displayed on a screen can be changed by selection of a mapping between the key identifier and a pattern. Because a keyboard is a complex mouse consisting of many buttons, it justifies a chapter of its own. Like a mouse, keyboards are serviced by the events they generate. Such events can be linked to achieve a variety of effects.