Important: The information in this document is obsolete and should not be used for new development.
GetDefaultInputMethod
TheGetDefaultInputMethod
function returns the default (input method) text service component for a given script and language.
FUNCTION GetDefaultInputMethod (VAR ts: Component; VAR slRecord: ScriptLanguageRecord): OSErr;
ts
- The component identifier of the input method text service component that is associated with the script and language combination given in the
slRecord
parameter.slRecord
- A script-language record that describes the script and language combination that is associated with the input method text service specified in the
ts
parameter.DESCRIPTION
The operating system usesGetDefaultInputMethod
to find out which input method to activate when the user selects a new keyboard script from the Keyboard menu or by Command-key combination, or when an application callsKeyScript
to change keyboard scripts.In versions of Japanese system software starting with KanjiTalk 7.0, if the default input method is an old (pre-KanjiTalk 7.0) non-TSM-aware method,
GetDefaultInputMethod
returns the errortsmInputMethodIsOldErr
. In that case thets
parameter contains the script code of the old input method in its high-order word, and the reference ID of the old input method in its low-order word.RESULT CODES
noErr No error paramErr The script does not match the language tsmScriptHasNoIMErr The script does not use input methods tsmInputMethodIsOldErr
The default input method is old-style