Important: The information in this document is obsolete and should not be used for new development.
SetDefaultInputMethod
The operating system uses theSetDefaultInputMethod
function to assign a default (input method) text service component to a given script and language.
FUNCTION SetDefaultInputMethod (ts: Component; VAR slRecord: ScriptLanguageRecord): OSErr;
ts
- The component identifier of the input method text service component to be associated with the script and language combination given in the
slRecord
parameter.slRecord
- A script-language record that describes the script and language combination to be associated with the input method text service component specified in the
ts
parameter.DESCRIPTION
The operating system usesSetDefaultInputMethod
to associate an input method text service component with a given script and language. The operating system calls this function when the user expresses input method preferences through the Keyboard menu, Keyboard control panel, or other device. The associations made with this function are permanent; that is, they persist after restart.If the script code and language code specified in the script-language record are incompatible,
SetDefaultInputMethod
returns the errorparamErr
.RESULT CODES
noErr No error paramErr The script does not match the language tsmScriptHasNoIMErr Current script does not use input methods tsmCantOpenComponentErr Cannot open default input of current script