Q:
I have written an input method for Mac OS X. How do I install
and use it?
A: Here are the steps required to install and activate an input method on Mac OS X.
Installing your input method for the first time
Copy your input method into the appropriate Components directory. The Text Services Manager will recognize text service components in the following Components directories. In most cases, you will install your input method in /Library/Components . Directory | Domain | Input Method Type and Availability | /System/Library/Components | System | System-provided components available to all users on the computer | /Library/Components | Local | User-installed components available to all users on the computer | ~/Library/Components | User | User-installed components available to the owner of the directory |
For example: mkdir -p /Library/Componentscp -r {MyInputMethod}.component /Library/Components/
NOTE: Apple recommends that you package all files used by your input method into a single bundle of type .component so your input method will appear as a single entity in the Finder. Files or executables intended to be manipulated by the user should not be placed in the Components directory. | Restart the computer. The Component Manager scans for components on startup so you must restart for your input method to be recognized. Open the System Preferences application. Select the International Panel. Select the Keyboard Menu Pane. Find your input method in the list and turn on its check box. As soon as you enable multiple keyboard layouts or input methods, the keyboard menu will appear as the right-most menu in all running applications. (The U.S. keyboard is always enabled so enabling any other keyboard layout or input method will cause the keyboard menu to appear.) Select your input method from the keyboard menu.
Installing subsequent development builds of your input method
The first time you install your input method, you must follow the steps described above. If you subsequently make modifications to your input method you can test it as described below without restarting the computer. Quit the application you are using to test your input method. Terminate server processes (if any) that belong to your input method. Replace your input method in the Components directory with the new version. Launch the application you are using to test your input method.
NOTE: If you modify the input method's name, icon, or 'thng' resource you need to restart for the changes to take effect. | Writing an installer
When you deliver your input method to users, you should package it in an installer. At a minimum, the installer should perform the following steps: Create the /Library/Components directory if it does not exist. Copy the input method and associated files into /Library/Components . Restart the computer.
IMPORTANT: Text service components are scanned on startup so you must require the user to restart the machine after installing the your input method. | For information on writing input methods see the Text Services Manager documentation and BasicInputMethod sample code.
[Sep 14 2001]
|