Up   Previous   Next  

Keyboards and Input Methods

The user typically enters text through a keyboard that your application then stores as character codes. The system reports the user's key-down, key-up, and auto-key events to your application. Key-down and key-up events indicate the user pressed or released a key, respectively. Auto-key events indicate the user has held a key down for a certain amount of time. For keyboard-related events, your application receives both the virtual key code and the character code for the key that is pressed, as well as the state of any modifier keys (For example, Shift, Caps Lock, Command, Option, and Control) at the time of the event.

For languages with large character sets, it is impractical to manufacture keyboards with keys for every possible character. In such a case, it is usually the job of an input method, working in conjunction with a keyboard, to handle text input. An input method is a software module, often independent of the application it serves, that performs complex processing of text input, prior to the application's processing of the text. A typical example of an input method is a translation service that converts character codes that can be entered from the keyboard into character codes that cannot; text input in Japanese, Chinese, and Korean usually requires an input method.


Copyright © 2001 Apple Computer, Inc. (Last Updated January 11, 2001)

Up   Previous   Next