Using BInputServerMethod

BInputServerMethod is a base class for input methods. These are instances of BInputServerMethod that act as an interface between the user and languages using character sets that can't be easily represented on standard keyboards, such as the Japanese input method that comes with BeOS.

Input methods generally handle B_KEY_DOWN messages in their Filter() function (see BInputServerFilter), keeping some sort of state around to translate these standard keyboard messages into new B_KEY_DOWN messages representing another character set. An input method can handle any input event, they're not limited to keyboard events.

Note:
Writing an input method is an involved process, even though the BInputMethod protocol is relatively simple. If you're working on an input method, please feel free to contact Be Developer Technical Support (devsupport@be.com) for additional information.

Input Method Events

See also:
Messages from Input Methods

Creating

To create a new input method, you must:
At boot time (or whenever the Input Server is restarted; see "Dynamic Loading"), the Input Server loads the add-ons it finds in the input method directories. For each add-on it finds, the Server invokes instantiate_input_method() to get a pointer to the add-on's BInputServerMethod object. After constructing the object, the Server calls InitCheck() to give the add-on a chance to bail out if the constructor failed.

Installing an Input Method

The input server looks for input methods in the "input_server/methods" subdirectories of B_BEOS_ADDONS_DIRECTORY, B_COMMON_ADDONS_DIRECTORY, and B_USER_ADDONS_DIRECTORY.

Copyright 2005 by yellowTAB GmbH, Be Inc., Palm Source Inc. and their respective legal successors
All rights reserved.